summaryrefslogtreecommitdiffstats
path: root/bpf.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-02-11 17:56:22 +0000
committerRoy Marples <roy@marples.name>2009-02-11 17:56:22 +0000
commiteab2229cfa459ccbf8178ad4cdba68fbb7ebaf46 (patch)
treeb896daed217eb023e6e5b5d152e9e8a9a0e42169 /bpf.c
parent63170def69524476fd43495ab1767b8690c0e9b5 (diff)
downloaddhcpcd-eab2229cfa459ccbf8178ad4cdba68fbb7ebaf46.tar.xz
Enforce NetBSD KNF style more
Diffstat (limited to 'bpf.c')
-rw-r--r--bpf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bpf.c b/bpf.c
index 948a72ca..cf1e3d90 100644
--- a/bpf.c
+++ b/bpf.c
@@ -136,7 +136,7 @@ eexit:
ssize_t
send_raw_packet(const struct interface *iface, int protocol,
- const void *data, ssize_t len)
+ const void *data, ssize_t len)
{
struct iovec iov[2];
struct ether_header hw;
@@ -160,7 +160,7 @@ send_raw_packet(const struct interface *iface, int protocol,
* So we pass the buffer in the API so we can loop on >1 packet. */
ssize_t
get_raw_packet(struct interface *iface, int protocol,
- void *data, ssize_t len)
+ void *data, ssize_t len)
{
int fd = -1;
struct bpf_hdr packet;
@@ -184,7 +184,7 @@ get_raw_packet(struct interface *iface, int protocol,
}
bytes = -1;
memcpy(&packet, iface->buffer + iface->buffer_pos,
- sizeof(packet));
+ sizeof(packet));
if (packet.bh_caplen != packet.bh_datalen)
goto next; /* Incomplete packet, drop. */
if (iface->buffer_pos + packet.bh_caplen + packet.bh_hdrlen >
@@ -197,7 +197,7 @@ get_raw_packet(struct interface *iface, int protocol,
memcpy(data, payload, bytes);
next:
iface->buffer_pos += BPF_WORDALIGN(packet.bh_hdrlen +
- packet.bh_caplen);
+ packet.bh_caplen);
if (iface->buffer_pos >= iface->buffer_len)
iface->buffer_len = iface->buffer_pos = 0;
if (bytes != -1)