diff options
| author | Roy Marples <roy@marples.name> | 2017-03-14 21:27:15 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-03-14 21:27:15 +0000 |
| commit | 441dde4fe1b37bc898a658445890b7e4b309b9e4 (patch) | |
| tree | 4fbdbc2847ae47d4e58547ba33128c3617017948 | |
| parent | a97e9a1ae3970f24ee664fbccf76ab8d22277f25 (diff) | |
| download | parpd-441dde4fe1b37bc898a658445890b7e4b309b9e4.tar.xz | |
arp_bpf -> bpf_arp
| -rw-r--r-- | bpf-filter.h | 8 | ||||
| -rw-r--r-- | bpf.c | 4 | ||||
| -rw-r--r-- | lpf.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/bpf-filter.h b/bpf-filter.h index 50f9438..1d28dbe 100644 --- a/bpf-filter.h +++ b/bpf-filter.h @@ -1,6 +1,6 @@ /* - * dhcpcd - DHCP client daemon - * Copyright (c) 2006-2014 Roy Marples <roy@marples.name> + * parpd: ARP BPF filter + * Copyright (c) 2006-2017 Roy Marples <roy@marples.name> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,7 +29,7 @@ #endif /* This is hardcoded for ethernet. */ -static const struct bpf_insn arp_bpf_filter [] = { +static const struct bpf_insn bpf_arp_filter [] = { /* Ensure packet is at least correct size. */ BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0), BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(struct ether_arp), 1, 0), @@ -72,4 +72,4 @@ static const struct bpf_insn arp_bpf_filter [] = { /* If we passed all the tests, ask for the whole packet. */ BPF_STMT(BPF_RET + BPF_K, BPF_WHOLEPACKET), }; -#define arp_bpf_filter_len sizeof(arp_bpf_filter) / sizeof(arp_bpf_filter[0]) +#define bpf_arp_filter_len sizeof(bpf_arp_filter) / sizeof(bpf_arp_filter[0]) @@ -109,8 +109,8 @@ bpf_open_arp(struct interface *ifp) goto eexit; #endif - pf.bf_insns = UNCONST(arp_bpf_filter); - pf.bf_len = arp_bpf_filter_len; + pf.bf_insns = UNCONST(bpf_arp_filter); + pf.bf_len = bpf_arp_filter_len; if (ioctl(fd, BIOCSETF, &pf) == -1) goto eexit; return fd; @@ -69,8 +69,8 @@ bpf_open_arp(struct interface *ifp) /* Install the ARP filter */ memset(&pf, 0, sizeof(pf)); - pf.filter = UNCONST(arp_bpf_filter); - pf.len = arp_bpf_filter_len; + pf.filter = UNCONST(bpf_arp_filter); + pf.len = bpf_arp_filter_len; if (setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, &pf, sizeof(pf)) != 0) goto eexit; if ((flags = fcntl(s, F_GETFL, 0)) == -1 |
