Changeset View
Changeset View
Standalone View
Standalone View
sbin/dhclient/bpf.c
| Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | for (b = 0;; b++) { | ||||
| } else | } else | ||||
| break; | break; | ||||
| } | } | ||||
| /* Set the BPF device to point at this interface. */ | /* Set the BPF device to point at this interface. */ | ||||
| if (ioctl(sock, BIOCSETIF, info->ifp) < 0) | if (ioctl(sock, BIOCSETIF, info->ifp) < 0) | ||||
| error("Can't attach interface %s to bpf device %s: %m", | error("Can't attach interface %s to bpf device %s: %m", | ||||
| info->name, filename); | info->name, filename); | ||||
| /* Tag the packets with the proper VLAN PCP setting. */ | |||||
| if (info->client->config->vlan_pcp != 0) { | |||||
| if (ioctl(sock, BIOCSETVLANPCP, | |||||
| &info->client->config->vlan_pcp) < 0) | |||||
| error( "Can't set the VLAN PCP tag on interface %s: %m", | |||||
| info->name); | |||||
| } | |||||
| return (sock); | return (sock); | ||||
| } | } | ||||
| /* | /* | ||||
| * Packet write filter program: | * Packet write filter program: | ||||
| * 'ip and udp and src port bootps and dst port (bootps or bootpc)' | * 'ip and udp and src port bootps and dst port (bootps or bootpc)' | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 390 Lines • Show Last 20 Lines | |||||