Commit Graph

69 Commits

Author SHA1 Message Date
Archie Cobbs
1e7a9f724c Fix bugs in the MP fragment reassembly code that can cause a panic. 1999-12-17 23:29:04 +00:00
Archie Cobbs
add85a1d6e New netgraph node type 'pptpgre': this performs GRE encapsulation
for the PPTP protocol as specified in RFC 2637.
1999-12-08 18:55:39 +00:00
Julian Elischer
647b86df6e Remove a bunch of un-needed includes.
Submitted by: phk@freebsd.org
1999-12-07 05:50:48 +00:00
Archie Cobbs
ab0d3c94db Change definition of NG_BPF_HOOKPROG_SIZE() so as not to require
a structure pointer, just the number of BPF instructions.
1999-12-06 18:43:32 +00:00
Archie Cobbs
92a3e5521f New netgraph node type, ng_bpf(8). This node type allows you to
apply bpf(4) filters to data travelling through a netgraph network.
1999-12-03 21:21:49 +00:00
Archie Cobbs
899e9c4e44 Add a new function ng_findhook() for finding a node's hook;
if the node type provides a more efficient implementation than
the normal linear scan, use it.

Reviewed by:	julian
1999-12-03 21:17:30 +00:00
Archie Cobbs
2076235ada Fix bug parsing 32 bit integers on machines where sizeof(long) == 4. 1999-12-03 20:27:33 +00:00
Archie Cobbs
3fae25a8a6 Use m_dup() instead of m_copypacket() to duplicate the mbuf chain.
This fixes a bug where if the original packet was modified downstream
of the tee node, then the copy could get modified too.
1999-12-01 23:11:58 +00:00
Archie Cobbs
63e2ac54d1 Add more comments describing how to use parse types and how they work. 1999-12-01 19:41:15 +00:00
Archie Cobbs
fa200997c8 Show how to supply a struct ng_cmdlist for (de)asciification
of control messages.

Suggested by:	julian
1999-12-01 19:40:37 +00:00
Julian Elischer
d0fef8084f change intial timeout for session negotiation from 1 to 2 seconds.
One second was being hit too many times in normal situations.
1999-12-01 08:05:56 +00:00
Archie Cobbs
f8307e1233 Add two new generic control messages, NGM_ASCII2BINARY and
NGM_BINARY2ASCII, which convert control messages to ASCII and back.
This allows control messages to be sent and received in ASCII form
using ngctl(8), which makes ngctl a lot more useful.

This also allows all the type-specific debugging code in libnetgraph
to go away -- instead, we just ask the node itself to do the ASCII
translation for us.

Currently, all generic control messages are supported, as well as
messages associated with the following node types: async, cisco,
ksocket, and ppp.

See /usr/share/examples/netgraph/ngctl for an example of using this.

Also give ngctl(8) the ability to print out incoming data and
control messages at any time.  Eventually nghook(8) may be subsumed.

Several other misc. bug fixes.

Reviewed by:	julian
1999-11-30 02:45:32 +00:00
Archie Cobbs
25792ef324 Change the prototype of the strto* routines to make the second
parameter a char ** instead of a const char **.  This make these
kernel routines consistent with the corresponding libc userland
routines.

Which is actually 'correct' is debatable, but consistency and
following the spec was deemed more important in this case.

Reviewed by (in concept):	phk, bde
1999-11-24 01:03:08 +00:00
Julian Elischer
aa548c6abe oops cut-n-paste error 1999-11-21 23:11:52 +00:00
Julian Elischer
cae912fcc8 It's time to only allow root to manipulate netgraph nodes.
(I meant to do this before checking in to FreeBSD and forgot)
1999-11-21 23:06:30 +00:00
Julian Elischer
490ccf9c5a Hopefully the last patch from Brian to get server side PPPoE working.
remove a 'free' that is no longer needed.
1999-11-21 22:18:54 +00:00
Julian Elischer
6faf164ce9 Fixes from brian. With some changes from me.
Allows FreeBSD to run as a PPPOE server
One patch still not included.
1999-11-21 10:43:05 +00:00
Archie Cobbs
046eea23cf Revert previous commit now that 'acfcomp' has been removed from
libnetgraph/debug.c to fix make world.
1999-11-19 20:42:14 +00:00
Julian Elischer
0d28d9ea80 Add a field archie forgot to merge in from out sources. 1999-11-19 20:32:46 +00:00
Archie Cobbs
0e97a08fe9 Use 'struct ng_xxx_private' instead of 'struct private' to help gdb
disambiguate when debugging.
1999-11-19 05:50:29 +00:00
Archie Cobbs
62838fae89 Fix bug where hook pointers were not getting updated on disconnection. 1999-11-19 05:49:54 +00:00
Archie Cobbs
da0929306d Move misplaced #define. 1999-11-19 05:49:18 +00:00
Archie Cobbs
19bff684a4 Add some safety using KASSERT() and splnet(). 1999-11-19 05:45:11 +00:00
Archie Cobbs
b2da83c2f5 Use KASSERT() instead of old #ifdef DIAGNOSTICS.
Add more INVARIANTS-enabled sanity checking.
1999-11-19 05:43:33 +00:00
Archie Cobbs
19a52c592d Remove the address and control field compression functionality of this
node type.  ACF is device independent and therefore belongs in ng_ppp.c
(which already implements it).
1999-11-19 04:27:53 +00:00
Archie Cobbs
3a58352eb0 Rename 'struct private' to 'struct ng_xxx_private' to allow gdb
to disambiguate when debugging.
1999-11-19 04:25:39 +00:00
Archie Cobbs
4e256e6e1b When allocating a new PKTHDR mbuf, always set m->m_pkthdr.rcvif = NULL. 1999-11-17 17:41:22 +00:00
Archie Cobbs
cb3c7a5d3b New netgraph node type "ksocket".
Obtained from:	Whistle source tree
1999-11-16 23:25:11 +00:00
Archie Cobbs
309c48c65b More bug fixes for the VJ Compression node. Seems to work now (really). 1999-11-15 20:02:58 +00:00
Julian Elischer
bdaf2e812a Small fixes from Brian for the Server side of PPPoE. 1999-11-15 04:03:34 +00:00
Julian Elischer
1f89d938ec Rework some tag handling, prompted by Brian Somers. 1999-11-14 17:26:58 +00:00
Julian Elischer
4adb13fd61 Try handle missing packet tags better.
Inspired by changes suggested by brian Somers.
1999-11-14 10:21:26 +00:00
Brian Somers
03e3936479 Provide an empty name to getsockname() if one hasn't been set up.
Ok'd (for now) by: julian
1999-11-11 20:08:04 +00:00
Archie Cobbs
0e11d0f3ea More bug fixes. 1999-11-10 23:56:57 +00:00
Archie Cobbs
b213189995 Minor change to the configuration of number of slots. 1999-11-10 23:56:19 +00:00
Archie Cobbs
3f47e1e357 Fix some bugs; seems to work now. Minor change to the configuration field
to make the number of compression slots parameter consistent with what
IPCP negotiates (ie, the number of slots - 1).
1999-11-10 06:17:14 +00:00
Archie Cobbs
d690a6e798 Move handling of the address and control fields into the PPP node;
they belong there because they are device independent.
Also some other misc. fixes.
1999-11-10 06:15:22 +00:00
Julian Elischer
12f035e0fd Remove a null pointer reference
Submitted by: Brian Somers (brian@freebsd.org)
1999-11-09 00:31:04 +00:00
Archie Cobbs
3a0d1d886a Fix crash when trying to duplicate a NULL meta. 1999-11-08 03:11:22 +00:00
Archie Cobbs
a8e9726dfd Get rid of the 'sync2' hook, which was a hack. Instead, just
directly detect outgoing LCP frames and do the right thing.
1999-11-08 03:10:20 +00:00
Archie Cobbs
a770f0a40f Add support for the IFF_MULTICAST flag. There's not
much to do because we are a point-to-point interface.

Submitted by:	phk
1999-11-08 03:08:59 +00:00
Julian Elischer
ef050c81c7 Be more accepting about the format of node IDs.
Submitted by: Brian Somers <brian@Awfulhak.org>
1999-11-07 04:18:20 +00:00
Julian Elischer
0e12356c53 Move a structure Netstat needs back out to ng_socketvar.h (yech) 1999-11-06 19:27:04 +00:00
Archie Cobbs
e149c4e211 Fix several bugs found in the first bit of testing. 1999-11-06 02:09:17 +00:00
Julian Elischer
df390790d1 Re-add this till I can fix netstat to not need it. 1999-11-05 20:04:00 +00:00
Julian Elischer
45168c5d16 Add the option for a socket node to shut down when the last hook
to an adjoining node is removed. Also move file scope definitions back
within the file, and remove un-needed include file.
1999-11-05 02:18:08 +00:00
Poul-Henning Kamp
5b664c7c13 Move isfoo() and friends to the newly created sys/ctype.h.
Urged by:       bde
1999-11-03 17:54:26 +00:00
Archie Cobbs
9cb887a606 Add statistics counters to "tee" netgraph node type. 1999-11-02 23:31:49 +00:00
Archie Cobbs
2b70adcbbe Simplify checking/parsing of strings using strtoul(), isdigit(), etc. 1999-11-02 23:18:01 +00:00
Archie Cobbs
fb1fc8abee Fix some bugs in MP allocation routine when links are non-equivalent. 1999-11-01 19:44:28 +00:00