summaryrefslogtreecommitdiff
path: root/netinet/sctputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'netinet/sctputil.h')
-rwxr-xr-xnetinet/sctputil.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/netinet/sctputil.h b/netinet/sctputil.h
index eec6c80..c807c66 100755
--- a/netinet/sctputil.h
+++ b/netinet/sctputil.h
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctputil.h 264679 2014-04-19 19:21:06Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctputil.h 269376 2014-08-01 12:42:37Z tuexen $");
#endif
#ifndef _NETINET_SCTP_UTIL_H_
@@ -146,9 +146,11 @@ struct sctp_paramhdr *
sctp_get_next_param(struct mbuf *, int,
struct sctp_paramhdr *, int);
-int sctp_add_pad_tombuf(struct mbuf *, int);
+struct mbuf *
+sctp_add_pad_tombuf(struct mbuf *, int);
-int sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *);
+struct mbuf *
+sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *);
void sctp_ulp_notify(uint32_t, struct sctp_tcb *, uint32_t, void *, int
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
@@ -240,10 +242,10 @@ sctp_recover_scope(struct sockaddr_in6 *, struct sockaddr_in6 *);
} while (0)
#else
#define sctp_recover_scope_mac(addr, store) do { \
- if ((addr->sin6_family == AF_INET6) && \
- (IN6_IS_SCOPE_LINKLOCAL(&addr->sin6_addr))) { \
+ if ((addr->sin6_family == AF_INET6) && \
+ (IN6_IS_SCOPE_LINKLOCAL(&addr->sin6_addr))) { \
*store = *addr; \
- if (addr->sin6_scope_id == 0) { \
+ if (addr->sin6_scope_id == 0) { \
if (!in6_recoverscope(store, &store->sin6_addr, \
NULL)) { \
addr = store; \
@@ -252,7 +254,7 @@ sctp_recover_scope(struct sockaddr_in6 *, struct sockaddr_in6 *);
in6_clearscope(&addr->sin6_addr); \
addr = store; \
} \
- } \
+ } \
} while (0)
#endif
#endif
@@ -291,42 +293,42 @@ sctp_free_bufspace(struct sctp_tcb *, struct sctp_association *,
#define sctp_free_bufspace(stcb, asoc, tp1, chk_cnt) \
do { \
if (tp1->data != NULL) { \
- atomic_subtract_int(&((asoc)->chunks_on_out_queue), chk_cnt); \
+ atomic_subtract_int(&((asoc)->chunks_on_out_queue), chk_cnt); \
if ((asoc)->total_output_queue_size >= tp1->book_size) { \
atomic_subtract_int(&((asoc)->total_output_queue_size), tp1->book_size); \
} else { \
(asoc)->total_output_queue_size = 0; \
} \
- if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
- (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
+ if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
+ (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
if (stcb->sctp_socket->so_snd.sb_cc >= tp1->book_size) { \
atomic_subtract_int(&((stcb)->sctp_socket->so_snd.sb_cc), tp1->book_size); \
} else { \
stcb->sctp_socket->so_snd.sb_cc = 0; \
} \
} \
- } \
+ } \
} while (0)
#endif
#define sctp_free_spbufspace(stcb, asoc, sp) \
do { \
- if (sp->data != NULL) { \
+ if (sp->data != NULL) { \
if ((asoc)->total_output_queue_size >= sp->length) { \
atomic_subtract_int(&(asoc)->total_output_queue_size, sp->length); \
} else { \
(asoc)->total_output_queue_size = 0; \
} \
- if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
- (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
+ if (stcb->sctp_socket && ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
+ (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
if (stcb->sctp_socket->so_snd.sb_cc >= sp->length) { \
atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc,sp->length); \
} else { \
stcb->sctp_socket->so_snd.sb_cc = 0; \
} \
} \
- } \
+ } \
} while (0)
#define sctp_snd_sb_alloc(stcb, sz) \