bpf.c (c06e7b66a147edf55f4241fbfbfa32856550cd15) | bpf.c (1e7fe2fbb9c0bed230d8db94d7444a90ca5ce199) |
---|---|
1/* $OpenBSD: bpf.c,v 1.13 2004/05/05 14:28:58 deraadt Exp $ */ 2 3/* BPF socket interface code, originally contributed by Archie Cobbs. */ 4 5/*- 6 * SPDX-License-Identifier: BSD-3-Clause 7 * 8 * Copyright (c) 1995, 1996, 1998, 1999 --- 76 unchanged lines hidden (view full) --- 85 break; 86 } 87 88 /* Set the BPF device to point at this interface. */ 89 if (ioctl(sock, BIOCSETIF, info->ifp) < 0) 90 error("Can't attach interface %s to bpf device %s: %m", 91 info->name, filename); 92 | 1/* $OpenBSD: bpf.c,v 1.13 2004/05/05 14:28:58 deraadt Exp $ */ 2 3/* BPF socket interface code, originally contributed by Archie Cobbs. */ 4 5/*- 6 * SPDX-License-Identifier: BSD-3-Clause 7 * 8 * Copyright (c) 1995, 1996, 1998, 1999 --- 76 unchanged lines hidden (view full) --- 85 break; 86 } 87 88 /* Set the BPF device to point at this interface. */ 89 if (ioctl(sock, BIOCSETIF, info->ifp) < 0) 90 error("Can't attach interface %s to bpf device %s: %m", 91 info->name, filename); 92 |
93 /* Tag the packets with the proper VLAN PCP setting. */ 94 if (info->client->config->vlan_pcp != 0) { 95 if (ioctl(sock, BIOCSETVLANPCP, 96 &info->client->config->vlan_pcp) < 0) 97 error( "Can't set the VLAN PCP tag on interface %s: %m", 98 info->name); 99 } 100 |
|
93 return (sock); 94} 95 96/* 97 * Packet write filter program: 98 * 'ip and udp and src port bootps and dst port (bootps or bootpc)' 99 */ 100static struct bpf_insn dhcp_bpf_wfilter[] = { --- 389 unchanged lines hidden --- | 101 return (sock); 102} 103 104/* 105 * Packet write filter program: 106 * 'ip and udp and src port bootps and dst port (bootps or bootpc)' 107 */ 108static struct bpf_insn dhcp_bpf_wfilter[] = { --- 389 unchanged lines hidden --- |