1 2/* 3 * ng_rfc1490.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Author: Julian Elischer <julian@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_rfc1490.c 69922 2000-12-12 18:52:14Z julian $ |
40 * $Whistle: ng_rfc1490.c,v 1.22 1999/11/01 09:24:52 julian Exp $ 41 */ 42 43/* 44 * This node does RFC 1490 multiplexing. 45 * 46 * NOTE: RFC 1490 is updated by RFC 2427. 47 */ --- 53 unchanged lines hidden (view full) --- 101 NULL, 102 ng_rfc1490_constructor, 103 ng_rfc1490_rcvmsg, 104 ng_rfc1490_rmnode, 105 ng_rfc1490_newhook, 106 NULL, 107 NULL, 108 ng_rfc1490_rcvdata, |
109 ng_rfc1490_disconnect, 110 NULL 111}; 112NETGRAPH_INIT(rfc1490, &typestruct); 113 114/************************************************************************ 115 NETGRAPH NODE STUFF 116 ************************************************************************/ --- 92 unchanged lines hidden (view full) --- 209 */ 210 211#define MAX_ENCAPS_HDR 8 212#define ERROUT(x) do { error = (x); goto done; } while (0) 213#define OUICMP(P,A,B,C) ((P)[0]==(A) && (P)[1]==(B) && (P)[2]==(C)) 214 215static int 216ng_rfc1490_rcvdata(hook_p hook, struct mbuf *m, meta_p meta, |
217 struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp) |
218{ 219 const node_p node = hook->node; 220 const priv_p priv = node->private; 221 int error = 0; 222 223 if (hook == priv->downlink) { 224 u_char *start, *ptr; 225 --- 120 unchanged lines hidden --- |