1/*
2 * Copyright (C) 1998 WIDE Project.
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
--- 12 unchanged lines hidden (view full) ---
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/netinet6/mld6.c 54263 1999-12-07 17:39:16Z shin $
30 */
31
32/*
33 * Copyright (c) 1988 Stephen Deering.
34 * Copyright (c) 1992, 1993
35 * The Regents of the University of California. All rights reserved.
36 *
37 * This code is derived from software contributed to Berkeley by
--- 25 unchanged lines hidden (view full) ---
63 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
64 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
65 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
66 * SUCH DAMAGE.
67 *
68 * @(#)igmp.c 8.1 (Berkeley) 7/19/93
69 */
70
71#include <sys/param.h>
72#include <sys/systm.h>
73#include <sys/mbuf.h>
74#include <sys/socket.h>
75#include <sys/protosw.h>
76#include <sys/syslog.h>
77
78#include <net/if.h>
--- 307 unchanged lines hidden (view full) ---
386 if (mh == NULL)
387 return;
388 MGET(md, M_DONTWAIT, MT_DATA);
389 if (md == NULL) {
390 m_free(mh);
391 return;
392 }
393 mh->m_next = md;
394
395#ifdef IPSEC
396 mh->m_pkthdr.rcvif = NULL;
397#endif
398 mh->m_pkthdr.len = sizeof(struct ip6_hdr) + sizeof(struct mld6_hdr);
399 mh->m_len = sizeof(struct ip6_hdr);
400 MH_ALIGN(mh, sizeof(struct ip6_hdr));
401
402 /* fill in the ip6 header */
403 ip6 = mtod(mh, struct ip6_hdr *);
404 ip6->ip6_flow = 0;
405 ip6->ip6_vfc = IPV6_VERSION;
--- 51 unchanged lines hidden ---
2 * Copyright (C) 1998 WIDE Project.
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
--- 12 unchanged lines hidden (view full) ---
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/netinet6/mld6.c 54263 1999-12-07 17:39:16Z shin $
30 */
31
32/*
33 * Copyright (c) 1988 Stephen Deering.
34 * Copyright (c) 1992, 1993
35 * The Regents of the University of California. All rights reserved.
36 *
37 * This code is derived from software contributed to Berkeley by
--- 25 unchanged lines hidden (view full) ---
63 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
64 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
65 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
66 * SUCH DAMAGE.
67 *
68 * @(#)igmp.c 8.1 (Berkeley) 7/19/93
69 */
70
71#include <sys/param.h>
72#include <sys/systm.h>
73#include <sys/mbuf.h>
74#include <sys/socket.h>
75#include <sys/protosw.h>
76#include <sys/syslog.h>
77
78#include <net/if.h>
--- 307 unchanged lines hidden (view full) ---
386 if (mh == NULL)
387 return;
388 MGET(md, M_DONTWAIT, MT_DATA);
389 if (md == NULL) {
390 m_free(mh);
391 return;
392 }
393 mh->m_next = md;
394
395#ifdef IPSEC
396 mh->m_pkthdr.rcvif = NULL;
397#endif
398 mh->m_pkthdr.len = sizeof(struct ip6_hdr) + sizeof(struct mld6_hdr);
399 mh->m_len = sizeof(struct ip6_hdr);
400 MH_ALIGN(mh, sizeof(struct ip6_hdr));
401
402 /* fill in the ip6 header */
403 ip6 = mtod(mh, struct ip6_hdr *);
404 ip6->ip6_flow = 0;
405 ip6->ip6_vfc = IPV6_VERSION;
--- 51 unchanged lines hidden ---