Deleted Added
full compact
sctp_constants.h (179157) sctp_constants.h (180387)
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_constants.h 179157 2008-05-20 13:47:46Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_constants.h 180387 2008-07-09 16:45:30Z rrs $");
35
36#ifndef __sctp_constants_h__
37#define __sctp_constants_h__
38
39/* IANA assigned port number for SCTP over UDP encapsulation */
40#define SCTP_OVER_UDP_TUNNELING_PORT 9899
41
42/* Number of packets to get before sack sent by default */

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

1065 (((uint8_t *)&(a)->s_addr)[2] == 0) && \
1066 (((uint8_t *)&(a)->s_addr)[3] == 1))
1067
1068
1069#if defined(_KERNEL)
1070
1071#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
1072#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
35
36#ifndef __sctp_constants_h__
37#define __sctp_constants_h__
38
39/* IANA assigned port number for SCTP over UDP encapsulation */
40#define SCTP_OVER_UDP_TUNNELING_PORT 9899
41
42/* Number of packets to get before sack sent by default */

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

1065 (((uint8_t *)&(a)->s_addr)[2] == 0) && \
1066 (((uint8_t *)&(a)->s_addr)[3] == 1))
1067
1068
1069#if defined(_KERNEL)
1070
1071#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
1072#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
1073#endif
1073/*#if defined(__FreeBSD__) || defined(__APPLE__)*/
1074/*#define SCTP_GETTIME_TIMEVAL(x) { \*/
1075/* (x)->tv_sec = ticks / 1000; \*/
1076/* (x)->tv_usec = (ticks % 1000) * 1000; \*/
1077/*}*/
1078
1079/*#else*/
1080/*#define SCTP_GETTIME_TIMEVAL(x) (microtime(x))*/
1081/*#endif __FreeBSD__ */
1082
1074/*#if defined(__FreeBSD__) || defined(__APPLE__)*/
1075/*#define SCTP_GETTIME_TIMEVAL(x) { \*/
1076/* (x)->tv_sec = ticks / 1000; \*/
1077/* (x)->tv_usec = (ticks % 1000) * 1000; \*/
1078/*}*/
1079
1080/*#else*/
1081/*#define SCTP_GETTIME_TIMEVAL(x) (microtime(x))*/
1082/*#endif __FreeBSD__ */
1083
1084#if defined(_KERNEL) || defined(__Userspace__)
1083#define sctp_sowwakeup(inp, so) \
1084do { \
1085 if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \
1086 inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEOUTPUT; \
1087 } else { \
1088 sowwakeup(so); \
1089 } \
1090} while (0)

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

1113 if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \
1114 inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEINPUT; \
1115 SOCKBUF_UNLOCK(&((so)->so_rcv)); \
1116 } else { \
1117 sorwakeup_locked(so); \
1118 } \
1119} while (0)
1120
1085#define sctp_sowwakeup(inp, so) \
1086do { \
1087 if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \
1088 inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEOUTPUT; \
1089 } else { \
1090 sowwakeup(so); \
1091 } \
1092} while (0)

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

1115 if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \
1116 inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEINPUT; \
1117 SOCKBUF_UNLOCK(&((so)->so_rcv)); \
1118 } else { \
1119 sorwakeup_locked(so); \
1120 } \
1121} while (0)
1122
1121#endif /* _KERNEL */
1123#endif /* _KERNEL || __Userspace__ */
1122#endif
1124#endif