Deleted Added
full compact
sctp_os_bsd.h (235828) sctp_os_bsd.h (237540)
1/*-
2 * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved.
3 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
4 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

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

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006-2007, by Cisco Systems, Inc. All rights reserved.
3 * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved.
4 * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

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

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_os_bsd.h 235828 2012-05-23 11:26:28Z tuexen $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_os_bsd.h 237540 2012-06-24 21:25:54Z tuexen $");
35
36#ifndef _NETINET_SCTP_OS_BSD_H_
37#define _NETINET_SCTP_OS_BSD_H_
38/*
39 * includes
40 */
41#include "opt_ipsec.h"
42#include "opt_compat.h"

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

360
361/* For BSD this just accesses the M_PKTHDR length
362 * so it operates on an mbuf with hdr flag. Other
363 * O/S's may have separate packet header and mbuf
364 * chain pointers.. thus the macro.
365 */
366#define SCTP_HEADER_TO_CHAIN(m) (m)
367#define SCTP_DETACH_HEADER_FROM_CHAIN(m)
35
36#ifndef _NETINET_SCTP_OS_BSD_H_
37#define _NETINET_SCTP_OS_BSD_H_
38/*
39 * includes
40 */
41#include "opt_ipsec.h"
42#include "opt_compat.h"

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

360
361/* For BSD this just accesses the M_PKTHDR length
362 * so it operates on an mbuf with hdr flag. Other
363 * O/S's may have separate packet header and mbuf
364 * chain pointers.. thus the macro.
365 */
366#define SCTP_HEADER_TO_CHAIN(m) (m)
367#define SCTP_DETACH_HEADER_FROM_CHAIN(m)
368#define SCTP_HEADER_LEN(m) (m->m_pkthdr.len)
368#define SCTP_HEADER_LEN(m) ((m)->m_pkthdr.len)
369#define SCTP_GET_HEADER_FOR_OUTPUT(o_pak) 0
370#define SCTP_RELEASE_HEADER(m)
371#define SCTP_RELEASE_PKT(m) sctp_m_freem(m)
372#define SCTP_ENABLE_UDP_CSUM(m) do { \
373 m->m_pkthdr.csum_flags = CSUM_UDP; \
374 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); \
375 } while (0)
376

--- 140 unchanged lines hidden ---
369#define SCTP_GET_HEADER_FOR_OUTPUT(o_pak) 0
370#define SCTP_RELEASE_HEADER(m)
371#define SCTP_RELEASE_PKT(m) sctp_m_freem(m)
372#define SCTP_ENABLE_UDP_CSUM(m) do { \
373 m->m_pkthdr.csum_flags = CSUM_UDP; \
374 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); \
375 } while (0)
376

--- 140 unchanged lines hidden ---