acf.c (a57095e7f7d70ed76edfd028480dc277a4ce17be) acf.c (057f1760a8171825b260dad27502f74ed5f69faf)
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

--- 42 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 *
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

--- 42 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 ---