diff options
author | obrien <obrien@FreeBSD.org> | 1999-06-23 23:40:02 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-06-23 23:40:02 +0000 |
commit | bb7cda744509ca00fdfaacff74526af8928253b4 (patch) | |
tree | 1f762fde578b5005be25198c106c89beb9550ae2 /contrib/isc-dhcp/common/bpf.c | |
parent | 76664fd3c5ed0bff5785e0d1beeab0742940552b (diff) | |
download | FreeBSD-src-bb7cda744509ca00fdfaacff74526af8928253b4.zip FreeBSD-src-bb7cda744509ca00fdfaacff74526af8928253b4.tar.gz |
Virgin import of ISC-DHCP v2.0
Diffstat (limited to 'contrib/isc-dhcp/common/bpf.c')
-rw-r--r-- | contrib/isc-dhcp/common/bpf.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/contrib/isc-dhcp/common/bpf.c b/contrib/isc-dhcp/common/bpf.c index d1c3b1a..e204dfe 100644 --- a/contrib/isc-dhcp/common/bpf.c +++ b/contrib/isc-dhcp/common/bpf.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: bpf.c,v 1.19.2.9 1999/03/29 22:07:12 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: bpf.c,v 1.19.2.10 1999/05/27 17:44:51 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -186,6 +186,20 @@ struct bpf_insn dhcp_bpf_filter [] = { }; int dhcp_bpf_filter_len = sizeof dhcp_bpf_filter / sizeof (struct bpf_insn); + +struct bpf_insn dhcp_bpf_tr_filter [] = { + /* accept all token ring packets due to variable length header */ + /* if we want to get clever, insert the program here */ + + /* If we passed all the tests, ask for the whole packet. */ + BPF_STMT(BPF_RET+BPF_K, (u_int)-1), + + /* Otherwise, drop it. */ + BPF_STMT(BPF_RET+BPF_K, 0), +}; + +int dhcp_bpf_tr_filter_len = (sizeof dhcp_bpf_tr_filter / + sizeof (struct bpf_insn)); #endif #if defined (USE_BPF_RECEIVE) |