acf.c (131327) | acf.c (134789) |
---|---|
1/*- 2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/ppp/acf.c 131327 2004-06-30 12:24:56Z brian $ | 26 * $FreeBSD: head/usr.sbin/ppp/acf.c 134789 2004-09-05 01:46:52Z brian $ |
27 */ 28 29#include <sys/types.h> 30 31#include <stdio.h> 32#include <termios.h> 33 34#include "defs.h" --- 16 unchanged lines hidden (view full) --- 51 52int 53acf_WrapperOctets(struct lcp *lcp, u_short proto) 54{ 55 return (proto == PROTO_LCP || lcp->his_acfcomp == 0) ? 2 : 0; 56} 57 58static struct mbuf * | 27 */ 28 29#include <sys/types.h> 30 31#include <stdio.h> 32#include <termios.h> 33 34#include "defs.h" --- 16 unchanged lines hidden (view full) --- 51 52int 53acf_WrapperOctets(struct lcp *lcp, u_short proto) 54{ 55 return (proto == PROTO_LCP || lcp->his_acfcomp == 0) ? 2 : 0; 56} 57 58static struct mbuf * |
59acf_LayerPush(struct bundle *b, struct link *l, struct mbuf *bp, 60 int pri, u_short *proto) | 59acf_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp, 60 int pri __unused, u_short *proto) |
61{ 62 const u_char cp[2] = { HDLC_ADDR, HDLC_UI }; 63 64 if (*proto == PROTO_LCP || l->lcp.his_acfcomp == 0) { 65 bp = m_prepend(bp, cp, 2, 0); 66 m_settype(bp, MB_ACFOUT); 67 } 68 69 return bp; 70} 71 72static struct mbuf * | 61{ 62 const u_char cp[2] = { HDLC_ADDR, HDLC_UI }; 63 64 if (*proto == PROTO_LCP || l->lcp.his_acfcomp == 0) { 65 bp = m_prepend(bp, cp, 2, 0); 66 m_settype(bp, MB_ACFOUT); 67 } 68 69 return bp; 70} 71 72static struct mbuf * |
73acf_LayerPull(struct bundle *b, struct link *l, struct mbuf *bp, u_short *proto) | 73acf_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp, 74 u_short *proto __unused) |
74{ 75 struct physical *p = link2physical(l); 76 u_char cp[2]; 77 78 if (!p) { 79 log_Printf(LogERROR, "Can't Pull an acf packet from a logical link\n"); 80 return bp; 81 } --- 34 unchanged lines hidden --- | 75{ 76 struct physical *p = link2physical(l); 77 u_char cp[2]; 78 79 if (!p) { 80 log_Printf(LogERROR, "Can't Pull an acf packet from a logical link\n"); 81 return bp; 82 } --- 34 unchanged lines hidden --- |