Deleted Added
full compact
proto.c (63484) proto.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/proto.c 63484 2000-07-19 02:10:35Z brian $
26 * $FreeBSD: head/usr.sbin/ppp/proto.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 "layer.h"

--- 29 unchanged lines hidden (view full) ---

64 bp = m_prepend(bp, cp + 1, 1, extra);
65 else
66 bp = m_prepend(bp, cp, 2, extra);
67
68 return bp;
69}
70
71static struct mbuf *
27 */
28
29#include <sys/types.h>
30
31#include <stdio.h>
32#include <termios.h>
33
34#include "layer.h"

--- 29 unchanged lines hidden (view full) ---

64 bp = m_prepend(bp, cp + 1, 1, extra);
65 else
66 bp = m_prepend(bp, cp, 2, extra);
67
68 return bp;
69}
70
71static struct mbuf *
72proto_LayerPush(struct bundle *b, struct link *l, struct mbuf *bp,
73 int pri, u_short *proto)
72proto_LayerPush(struct bundle *b __unused, struct link *l, struct mbuf *bp,
73 int pri __unused, u_short *proto)
74{
75 log_Printf(LogDEBUG, "proto_LayerPush: Using 0x%04x\n", *proto);
76 bp = proto_Prepend(bp, *proto, l->lcp.his_protocomp,
77 acf_WrapperOctets(&l->lcp, *proto));
78 m_settype(bp, MB_PROTOOUT);
79 link_ProtocolRecord(l, *proto, PROTO_OUT);
80
81 return bp;
82}
83
84static struct mbuf *
74{
75 log_Printf(LogDEBUG, "proto_LayerPush: Using 0x%04x\n", *proto);
76 bp = proto_Prepend(bp, *proto, l->lcp.his_protocomp,
77 acf_WrapperOctets(&l->lcp, *proto));
78 m_settype(bp, MB_PROTOOUT);
79 link_ProtocolRecord(l, *proto, PROTO_OUT);
80
81 return bp;
82}
83
84static struct mbuf *
85proto_LayerPull(struct bundle *b, struct link *l, struct mbuf *bp,
85proto_LayerPull(struct bundle *b __unused, struct link *l, struct mbuf *bp,
86 u_short *proto)
87{
88 u_char cp[2];
89 size_t got;
90
91 if ((got = mbuf_View(bp, cp, 2)) == 0) {
92 m_freem(bp);
93 return NULL;

--- 22 unchanged lines hidden ---
86 u_short *proto)
87{
88 u_char cp[2];
89 size_t got;
90
91 if ((got = mbuf_View(bp, cp, 2)) == 0) {
92 m_freem(bp);
93 return NULL;

--- 22 unchanged lines hidden ---