ng_rfc1490.c (97897) | ng_rfc1490.c (109623) |
---|---|
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 * | 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 97897 2002-06-05 23:35:31Z archie $ | 39 * $FreeBSD: head/sys/netgraph/ng_rfc1490.c 109623 2003-01-21 08:56:16Z alfred $ |
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 */ --- 225 unchanged lines hidden (view full) --- 273 ptr--; /* NLPID becomes PPP proto */ 274 if ((*ptr & 0x01) == 0x01) 275 ERROUT(0); 276 m_adj(m, ptr - start); 277 NG_FWD_NEW_DATA(error, item, priv->ppp, m); 278 break; 279 } 280 } else if (hook == priv->ppp) { | 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 */ --- 225 unchanged lines hidden (view full) --- 273 ptr--; /* NLPID becomes PPP proto */ 274 if ((*ptr & 0x01) == 0x01) 275 ERROUT(0); 276 m_adj(m, ptr - start); 277 NG_FWD_NEW_DATA(error, item, priv->ppp, m); 278 break; 279 } 280 } else if (hook == priv->ppp) { |
281 M_PREPEND(m, 2, M_DONTWAIT); /* Prepend PPP NLPID */ | 281 M_PREPEND(m, 2, M_NOWAIT); /* Prepend PPP NLPID */ |
282 if (!m) 283 ERROUT(ENOBUFS); 284 mtod(m, u_char *)[0] = HDLC_UI; 285 mtod(m, u_char *)[1] = NLPID_PPP; 286 NG_FWD_NEW_DATA(error, item, priv->downlink, m); 287 } else if (hook == priv->inet) { | 282 if (!m) 283 ERROUT(ENOBUFS); 284 mtod(m, u_char *)[0] = HDLC_UI; 285 mtod(m, u_char *)[1] = NLPID_PPP; 286 NG_FWD_NEW_DATA(error, item, priv->downlink, m); 287 } else if (hook == priv->inet) { |
288 M_PREPEND(m, 2, M_DONTWAIT); /* Prepend IP NLPID */ | 288 M_PREPEND(m, 2, M_NOWAIT); /* Prepend IP NLPID */ |
289 if (!m) 290 ERROUT(ENOBUFS); 291 mtod(m, u_char *)[0] = HDLC_UI; 292 mtod(m, u_char *)[1] = NLPID_IP; 293 NG_FWD_NEW_DATA(error, item, priv->downlink, m); 294 } else 295 panic(__func__); 296 --- 45 unchanged lines hidden --- | 289 if (!m) 290 ERROUT(ENOBUFS); 291 mtod(m, u_char *)[0] = HDLC_UI; 292 mtod(m, u_char *)[1] = NLPID_IP; 293 NG_FWD_NEW_DATA(error, item, priv->downlink, m); 294 } else 295 panic(__func__); 296 --- 45 unchanged lines hidden --- |