Deleted Added
full compact
ng_rfc1490.c (68876) ng_rfc1490.c (69922)
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 68876 2000-11-18 15:17:43Z dwmalone $
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,
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_rcvdata,
110 ng_rfc1490_disconnect,
111 NULL
112};
113NETGRAPH_INIT(rfc1490, &typestruct);
114
115/************************************************************************
116 NETGRAPH NODE STUFF
117 ************************************************************************/

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

210 */
211
212#define MAX_ENCAPS_HDR 8
213#define ERROUT(x) do { error = (x); goto done; } while (0)
214#define OUICMP(P,A,B,C) ((P)[0]==(A) && (P)[1]==(B) && (P)[2]==(C))
215
216static int
217ng_rfc1490_rcvdata(hook_p hook, struct mbuf *m, meta_p meta,
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,
218 struct mbuf **ret_m, meta_p *ret_meta)
217 struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
219{
220 const node_p node = hook->node;
221 const priv_p priv = node->private;
222 int error = 0;
223
224 if (hook == priv->downlink) {
225 u_char *start, *ptr;
226

--- 120 unchanged lines hidden ---
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 ---