summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/dhclient/bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sbin/dhclient/bpf.c')
-rw-r--r--freebsd/sbin/dhclient/bpf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/freebsd/sbin/dhclient/bpf.c b/freebsd/sbin/dhclient/bpf.c
index 978faa58..e1bfacdc 100644
--- a/freebsd/sbin/dhclient/bpf.c
+++ b/freebsd/sbin/dhclient/bpf.c
@@ -97,7 +97,7 @@ if_register_bpf(struct interface_info *info, int flags)
* Packet write filter program:
* 'ip and udp and src port bootps and dst port (bootps or bootpc)'
*/
-struct bpf_insn dhcp_bpf_wfilter[] = {
+static struct bpf_insn dhcp_bpf_wfilter[] = {
BPF_STMT(BPF_LD + BPF_B + BPF_IND, 14),
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (IPVERSION << 4) + 5, 0, 12),
@@ -131,7 +131,7 @@ struct bpf_insn dhcp_bpf_wfilter[] = {
BPF_STMT(BPF_RET+BPF_K, 0),
};
-int dhcp_bpf_wfilter_len = sizeof(dhcp_bpf_wfilter) / sizeof(struct bpf_insn);
+static int dhcp_bpf_wfilter_len = nitems(dhcp_bpf_wfilter);
void
if_register_send(struct interface_info *info)
@@ -186,7 +186,7 @@ if_register_send(struct interface_info *info)
* XXX: Changes to the filter program may require changes to the
* constant offsets used in if_register_send to patch the BPF program!
*/
-struct bpf_insn dhcp_bpf_filter[] = {
+static struct bpf_insn dhcp_bpf_filter[] = {
/* Make sure this is an IP packet... */
BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12),
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 0, 8),
@@ -213,7 +213,7 @@ struct bpf_insn dhcp_bpf_filter[] = {
BPF_STMT(BPF_RET+BPF_K, 0),
};
-int dhcp_bpf_filter_len = sizeof(dhcp_bpf_filter) / sizeof(struct bpf_insn);
+static int dhcp_bpf_filter_len = nitems(dhcp_bpf_filter);
void
if_register_receive(struct interface_info *info)