Commit Graph

124 Commits

Author SHA1 Message Date
archie
aa18c97d97 Export ng_ether_enaddr_type for other nodes that want to use it. 2000-08-30 18:39:29 +00:00
archie
ea7f4b349e Add three more control messages to complement their opposites:
NGM_ETHER_SET_ENADDR, NGM_ETHER_GET_PROMISC, and NGM_ETHER_GET_AUTOSRC.
Alter parsing algorithm so the EN address really looks like one.
2000-08-15 01:05:50 +00:00
archie
2a80433335 Oops, previous commit fixed a bug that was already fixed before.
Back it out.
2000-08-10 23:04:46 +00:00
archie
e468b87d91 Add new control message to atomically get and clear statistics. 2000-08-10 22:52:40 +00:00
archie
6a4c08bdfb Increase the maximum allowable datagram length. 2000-08-10 22:51:57 +00:00
archie
5e2c181f23 "u_int32_t" should have been "int32_t". 2000-08-10 22:51:26 +00:00
archie
6119100c13 Use a bigger buffer for NGM_BINARY2ASCII conversion, to handle really
long ASCII control messages.
2000-08-10 22:50:38 +00:00
archie
5187133877 - Add new control message NGM_VJC_GET_CONFIG
- Implement control message ASCII'fication for all control messages
2000-08-10 22:48:03 +00:00
archie
96ac86461c Take advantage of the new unsigned and hex integer types. 2000-08-10 22:45:54 +00:00
archie
4b583b7cec - Make statistics unsigned.
- Add new control message to atomically get and clear statistics.
2000-08-10 22:44:41 +00:00
archie
4b45b46df3 - Add new unsigned and hex integer parse types
- Fix bug in commented example code
2000-08-10 22:43:38 +00:00
archie
5fc907de16 - Add new unsigned and hex integer parse types; this allows simplifying
the bytearray parse type.
- Allocate (larger) temporary work buffer dynamically instead of on the
  stack when comparing to the default value.
2000-08-10 22:42:25 +00:00
archie
0bf4e5c4ff RFC 1661 requires that all LCP packets are sent with no address and
control field compression. The ng_ppp(4) node correctly follows this
rule. However, PPPoE is an exception: when doing PPPoE *all* frames
are sent with address and control field compression.

Alter this node's behavior so that when an outgoing frame is received,
any leading address and control field bytes are removed. This makes
this node compatible with ng_ppp(4).
2000-08-10 20:05:12 +00:00
archie
7cffeeb59d In a struct sockaddr, sa->sa_len can be zero if uninitialized.
Make sure that this doesn't cause a problem when parsing.
2000-08-09 23:57:44 +00:00
archie
d14e412ecb Fix bug where bundle-level receive statistics were not getting updated. 2000-08-09 01:43:21 +00:00
archie
3f1d920325 Fix a bug where we were accessing already free'd memory during node shutdown.
Detected via:	0xdeadc0de
2000-08-07 22:41:12 +00:00
archie
27b10d992b Add three new control messages to the ng_ether(4) netgraph node type:
NGM_ETHER_GET_ENADDR:	Get the device's Ethernet address
    NGM_ETHER_SET_PROMISC:	Enable/disable promiscuous mode
    NGM_ETHER_SET_AUTOSRC:	Enable/disable packet source address override
2000-08-07 18:52:26 +00:00
archie
4bdc4a3139 Fix misspelling. 2000-08-05 20:17:04 +00:00
archie
4eb215e131 Followup to previous commit..
- It's worthwhile to use untimeout(9), even though we must still protect
  against "false" timeouts, because most of the time it saves having to
  handle a dummy timeout event.
- Slight tweaks to the delayed ACK algorithm paramters.
2000-07-25 18:57:20 +00:00
archie
ec9094a01d Several fixes:
- Fix slowness when operating over fast connections, where the timeout(9)
  granularity is on the same order of magnitude as the round trip time.
  timeout(9) can happen up to 1 tick early, which was causing receive
  ack timeouts to happen too early, causing bogus "lost" packets.
- Increase the local time counter to 64 bits to avoid roll-over.
- Keep statistics on memory allocation failures.
- Add a new option to always include the ack when sending data packets.
  Might be useful in high packet loss situations. Might not.
2000-07-25 00:23:19 +00:00
archie
ddc16920e2 Allocate memory with M_NOWAIT instead of M_WAITOK, because it's possible
for these routines to be called from an interrupt context.

PR:		kern/20057
2000-07-20 17:23:49 +00:00
archie
e069823661 Remove node's name reference when the interface is detached;
otherwise, the ng_ether.ko KLD will never be unloadable after
all Ethernet interfaces are detached, as it should be, because
of the lingering extra reference.

Submitted by:	"Yevmenkin, Maksim N, CSCIO" <myevmenkin@att.com>
2000-07-19 17:33:53 +00:00
archie
b3409e3b85 Set NG_INVALID flag when destroying node. 2000-07-14 22:35:13 +00:00
asmodai
7cf79d4951 Fix typo, teh -> the. 2000-07-14 11:17:16 +00:00
archie
b65a3d8a85 Fix race condition caused by using NG_SEND_DATAQ() where we meant
to use ng_queue_data().

Reported by:	Udo Erdelhoff <ue@nathan.ruhr.de>
2000-07-12 23:55:07 +00:00
julian
0a7cf87729 Don't forget to set our MAC address into packets we wre sending out via
netgraph. Eventually we may need to have a separate hook for packets
that already have a source AMC address but for now just drop it in.
Should fix PPPoE.
2000-07-06 15:35:59 +00:00
phk
1412169cf7 Experiemntal ascii based device configuration mechanism.
This may or may not survive, decision will be made well before 5.0-R
2000-07-03 13:34:18 +00:00
archie
7447cd61ab Fix incorrectly implemented receive ACK timeout algorithm:
instead of bumping the recvAck counter by one, pretend that
all outstanding xmit packets are acknowleged, and restart
transmitting anew, with an empty (but halved) transmit window.

Put a lower bound on the adaptive timeout value.
2000-06-28 19:43:34 +00:00
archie
1eeb0cec81 Make the ng_ether(4) node type dynamically loadable like the rest.
This means 'options NETGRAPH' is no longer necessary in order to get
netgraph-enabled Ethernet interfaces. This supports loading/unloading
the ng_ether.ko and attaching/detaching the Ethernet interface in any
order.

Add two new hooks 'upper' and 'lower' to allow access to the protocol
demux engine and the raw device, respectively. This enables bridging
to be defined as a netgraph node, if so desired.

Reviewed by:	freebsd-net@freebsd.org
2000-06-26 23:34:54 +00:00
archie
08f20b0a64 - Start sequence numbers at zero instead of one; the rest of the
world seems to interpret the spec this way
- Initialize transmit window to two instead of one; helps get things
  going initially when the first packet may get dropped
- Really fix the shutdown + timeout race condition this time
2000-06-26 19:43:24 +00:00
archie
258f2bb268 Fix bug where receive statistics for the bundle were not getting updated. 2000-06-01 01:29:49 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
archie
2e45cc942a Add hook for IPv6. 2000-05-10 16:54:00 +00:00
archie
c82f9f48f2 Fix a couple of bugs:
- Properly handle 32 bit sequence numbers when they wrap around
- Don't drop GRE packets with stale ACK numbers, just ignore the ACK
- Close race between node being shutdown and timer going off
Also add support for lots of statistics, and control message ASCIIfication
2000-05-05 01:11:39 +00:00
archie
3dd7f3d203 Don't assume *lasthook is initialized in ng_path2node(). 2000-05-02 17:09:46 +00:00
archie
f359b9e52d Fix broken multi-link fragment reassembly algorithm.
Add hook for IPv6. Misc cleanups.

PR:		kern/16335
2000-05-02 00:09:18 +00:00
archie
d3b6f2b7d9 Macro call to ng_send_dataq() should have been to ng_send_data() instead. 2000-05-01 23:34:15 +00:00
archie
5d5ea68a69 Use 'type_name' structure field instead of 'typename', which is
a C++ reserved work.

Add a ng_copy_meta() function.
2000-05-01 23:29:19 +00:00
peter
21896b3609 A temporary band-aid for ng_base. It works for some people, a better
fix will follow.

Submitted by:   Gary Jennejohn <garyj@muc.de>
2000-05-01 21:26:50 +00:00
peter
70a10fae0c Minimal tweak to make the ng_XXX modules depend on netgraph so that they
see its symbols and link ok.
2000-04-29 13:36:07 +00:00
julian
c823368bff Two simple changes to the kernel internal API for netgraph modules,
to support future work in flow-control and 'packet reject/replace'
processing modes.

reviewed by: phk, archie
2000-04-28 17:09:00 +00:00
phk
43018e3fb6 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
archie
d6596bcad2 Fix uninitialized variable.
PR:		kern/17911
Submitted by:	Tom Pavel <pavel@alum.mit.edu>
2000-04-12 17:29:33 +00:00
archie
119898c763 A netgraph node that implements Microsoft Point-to-Point compression
(MPPC) and Microsoft Point-to-Point encryption (MPPE) protocols.

Note: the MPPC part is disabled as it requires proprietary files.

Obtained from:	Whistle source tree
2000-04-09 21:04:55 +00:00
archie
68826a1850 Call bpfdetach() before going away. 2000-03-21 01:42:56 +00:00
phk
85c09f4445 Newer ciscos have become more picky, and will not accept the MULTICAST bit
being set for unicast packets.
2000-03-17 17:06:33 +00:00
archie
008dd6112b Updates to the ng_iface(8) netgraph node type:
- Make iface nodes removable on shutdown since FreeBSD now supports
    removable interfaces
  - Simplify supporting new protocols using family_enqueue(); add a
    few new ones including IPv6
  - Add support for configurable interface mode using new
    NGM_IFACE_POINT2POINT and NGM_IFACE_BROADCAST control messages
  - Remove NGM_IFACE_GET_IFADDRS control message; it just duplicates
    the functionality of SIOCGIFCONF
2000-03-13 19:18:10 +00:00
archie
8b895c9455 Some minor prototype tweaks. 2000-03-13 19:05:11 +00:00
archie
5621bcbfd1 Use snprintf() instead of sprintf(). 2000-03-13 18:54:10 +00:00