BSD 4_4_Lite1 release
[unix-history] / usr / src / sys / net / bpf.c
index e12955f..e40b769 100644 (file)
@@ -35,7 +35,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *      @(#)bpf.c      8.1 (Berkeley) 6/10/93
+ *      @(#)bpf.c      8.2 (Berkeley) 3/28/94
  *
  * static char rcsid[] =
  * "$Header: bpf.c,v 1.33 91/10/27 21:21:58 mccanne Exp $";
  *
  * static char rcsid[] =
  * "$Header: bpf.c,v 1.33 91/10/27 21:21:58 mccanne Exp $";
@@ -128,7 +128,7 @@ static void bpf_freed __P((struct bpf_d *));
 static void    bpf_freed __P((struct bpf_d *));
 static void    bpf_ifname __P((struct ifnet *, struct ifreq *));
 static void    bpf_ifname __P((struct ifnet *, struct ifreq *));
 static void    bpf_freed __P((struct bpf_d *));
 static void    bpf_ifname __P((struct ifnet *, struct ifreq *));
 static void    bpf_ifname __P((struct ifnet *, struct ifreq *));
-static void    bpf_mcopy __P((void *, void *, u_int));
+static void    bpf_mcopy __P((const void *, void *, u_int));
 static int     bpf_movein __P((struct uio *, int,
                    struct mbuf **, struct sockaddr *, int *));
 static int     bpf_setif __P((struct bpf_d *, struct ifreq *));
 static int     bpf_movein __P((struct uio *, int,
                    struct mbuf **, struct sockaddr *, int *));
 static int     bpf_setif __P((struct bpf_d *, struct ifreq *));
@@ -136,7 +136,7 @@ static int  bpf_setif __P((struct bpf_d *, struct ifreq *));
 static inline void
                bpf_wakeup __P((struct bpf_d *));
 static void    catchpacket __P((struct bpf_d *, u_char *, u_int,
 static inline void
                bpf_wakeup __P((struct bpf_d *));
 static void    catchpacket __P((struct bpf_d *, u_char *, u_int,
-                   u_int, void (*)(void *, void *, u_int)));
+                   u_int, void (*)(const void *, void *, u_int)));
 static void    reset_d __P((struct bpf_d *));
 
 static int
 static void    reset_d __P((struct bpf_d *));
 
 static int
@@ -1026,16 +1026,16 @@ bpf_tap(arg, pkt, pktlen)
  */
 static void
 bpf_mcopy(src_arg, dst_arg, len)
  */
 static void
 bpf_mcopy(src_arg, dst_arg, len)
-       void *src_arg, *dst_arg;
+       const void *src_arg;
+       void *dst_arg;
        register u_int len;
 {
        register u_int len;
 {
-       register struct mbuf *m;
+       register const struct mbuf *m;
        register u_int count;
        register u_int count;
-       u_char *src, *dst;
+       u_char *dst;
 
 
-       src = src_arg;
-       dst = dst_arg;
        m = src_arg;
        m = src_arg;
+       dst = dst_arg;
        while (len > 0) {
                if (m == 0)
                        panic("bpf_mcopy");
        while (len > 0) {
                if (m == 0)
                        panic("bpf_mcopy");
@@ -1085,7 +1085,7 @@ catchpacket(d, pkt, pktlen, snaplen, cpfn)
        register struct bpf_d *d;
        register u_char *pkt;
        register u_int pktlen, snaplen;
        register struct bpf_d *d;
        register u_char *pkt;
        register u_int pktlen, snaplen;
-       register void (*cpfn)();
+       register void (*cpfn)(const void *, void *, u_int);
 {
        register struct bpf_hdr *hp;
        register int totlen, curlen;
 {
        register struct bpf_hdr *hp;
        register int totlen, curlen;