Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

whitespace

  • Loading branch information...
commit e27e858cae18dba7824b9ff2792bff87516d57af 1 parent 7b67386
itojun authored
View
8 kame/sys/netinet/icmp6.h
@@ -1,4 +1,4 @@
-/* $KAME: icmp6.h,v 1.71 2002/05/27 04:18:29 itojun Exp $ */
+/* $KAME: icmp6.h,v 1.72 2002/06/09 16:29:54 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -141,7 +141,7 @@ struct icmp6_hdr {
#define MLD_MTRACE 201 /* mtrace messages */
#define MLDV2_LISTENER_REPORT 206 /* MLDv2 report */
-
+
#ifndef _KERNEL
#define MLD6_MTRACE_RESP MLD_MTRACE_RESP
#define MLD6_MTRACE MLD_MTRACE
@@ -670,7 +670,7 @@ struct icmp6stat {
* for netinet6 code, it is already available in icp6s_outhist[].
*/
u_quad_t icp6s_reflect;
- u_quad_t icp6s_inhist[256];
+ u_quad_t icp6s_inhist[256];
u_quad_t icp6s_nd_toomanyopt; /* too many ND options */
struct icmp6errstat icp6s_outerrhist;
#define icp6s_odst_unreach_noroute \
@@ -803,7 +803,7 @@ int icmp6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
struct ip6ctlparam;
void icmp6_mtudisc_update __P((struct ip6ctlparam *,
struct sockaddr_in6 *, int));
-
+
#if defined(__NetBSD__) || defined(__OpenBSD__)
void icmp6_mtudisc_callback_register __P((void (*)(struct in6_addr *)));
#endif
View
4 kame/sys/netinet/in_gif.c
@@ -1,4 +1,4 @@
-/* $KAME: in_gif.c,v 1.85 2002/05/30 04:13:44 itojun Exp $ */
+/* $KAME: in_gif.c,v 1.86 2002/06/09 16:29:54 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -83,7 +83,7 @@
#include <netinet/ip6.h>
#endif
-#include <net/if_gif.h>
+#include <net/if_gif.h>
#include "gif.h"
#ifdef __OpenBSD__
View
4 kame/sys/netinet/ip_encap.c
@@ -1,4 +1,4 @@
-/* $KAME: ip_encap.c,v 1.78 2002/03/14 08:21:32 itojun Exp $ */
+/* $KAME: ip_encap.c,v 1.79 2002/06/09 16:29:54 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -215,7 +215,7 @@ encap_init()
#ifdef USE_RADIX
/*
- * initialize radix lookup table.
+ * initialize radix lookup table.
* max_keylen initialization should happen before the call to rn_init().
*/
rn_inithead((void **)&encap_head[0], sizeof(struct sockaddr_pack) << 3);
View
6 kame/sys/netinet/sctp.h
@@ -1,4 +1,4 @@
-/* $KAME: sctp.h,v 1.5 2002/05/24 07:40:23 itojun Exp $ */
+/* $KAME: sctp.h,v 1.6 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp.h,v 1.43 2002/04/02 15:34:44 lei Exp */
#ifndef _NETINET_SCTP_H_
@@ -108,7 +108,7 @@ struct sctp_paramhdr {
* the normal syscall to toggle SS_NBIO the way you want.
*/
/* Blocking I/O is controled by the SS_NBIO flag on the
- * socket state so_state field.
+ * socket state so_state field.
*/
#define SCTP_GET_SNDBUF_USE 0x00008000
/* latter added read/write */
@@ -203,7 +203,7 @@ struct sctp_error_out_of_resource {
struct sctp_error_unresolv_addr {
struct sctp_error_cause cause; /* code=SCTP_ERROR_UNRESOLVABLE_ADDR */
-
+
};
struct sctp_error_unrecognized_chunk {
View
50 kame/sys/netinet/sctp_asconf.c
@@ -1,4 +1,4 @@
-/* $KAME: sctp_asconf.c,v 1.4 2002/06/08 21:42:38 itojun Exp $ */
+/* $KAME: sctp_asconf.c,v 1.5 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_asconf.c,v 1.72 2002/04/04 15:40:35 randall Exp */
/*
@@ -159,7 +159,7 @@ sctp_find_ifa_by_addr(struct sockaddr *sa) {
struct sockaddr_in *sin1, *sin2;
sin1 = (struct sockaddr_in *)ifa->ifa_addr;
sin2 = (struct sockaddr_in *)sa;
- if (sin1->sin_addr.s_addr ==
+ if (sin1->sin_addr.s_addr ==
sin2->sin_addr.s_addr) {
/* found it */
return(ifa);
@@ -227,7 +227,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause,
aph->ph.param_type = htons(SCTP_ERROR_CAUSE_IND);
error->code = htons(cause);
error->length = tlv_length + sizeof(struct sctp_error_cause);
- aph->ph.param_length = error->length +
+ aph->ph.param_length = error->length +
sizeof(struct sctp_asconf_paramhdr);
if (aph->ph.param_length > MLEN) {
@@ -602,7 +602,7 @@ sctp_handle_asconf(struct mbuf *m, int offset, struct sctp_asconf_chunk *cp,
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_asconf_chunk)) {
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
- printf("handle_asconf: chunk too small = %xh\n",
+ printf("handle_asconf: chunk too small = %xh\n",
ntohs(cp->ch.chunk_length));
}
#endif /* SCTP_DEBUG */
@@ -626,7 +626,7 @@ sctp_handle_asconf(struct mbuf *m, int offset, struct sctp_asconf_chunk *cp,
} else if (serial_num != (assoc->asconf_seq_in + 1)) {
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
- printf("handle_asconf: incorrect serial number = %xh (expected next = %xh)\n",
+ printf("handle_asconf: incorrect serial number = %xh (expected next = %xh)\n",
serial_num, assoc->asconf_seq_in+1);
}
#endif /* SCTP_DEBUG */
@@ -640,7 +640,7 @@ sctp_handle_asconf(struct mbuf *m, int offset, struct sctp_asconf_chunk *cp,
sizeof(struct sctp_asconf_chunk);
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
- printf("handle_asconf: length=%u, sequence=%xh\n",
+ printf("handle_asconf: length=%u, sequence=%xh\n",
asconf_length, serial_num);
}
#endif /* SCTP_DEBUG */
@@ -793,7 +793,7 @@ sctp_handle_asconf(struct mbuf *m, int offset, struct sctp_asconf_chunk *cp,
assoc->last_asconf_ack_sent = m_ack;
/* and send (a new one) it out... */
sctp_send_asconf_ack(stcb, 0);
-}
+}
/*
* does the address match?
@@ -835,7 +835,7 @@ sctp_asconf_cleanup(struct sctp_tcb *tcb, struct sctp_nets *netp) {
/* mark peer as ASCONF incapable */
tcb->asoc.peer_supports_asconf = 0;
tcb->asoc.peer_supports_asconf_setprim = 0;
- /*
+ /*
* clear out any existing asconfs going out
*/
sctp_timer_stop(SCTP_TIMER_TYPE_ASCONF, tcb->sctp_ep, tcb, netp);
@@ -915,7 +915,7 @@ sctp_asconf_queue_add(struct sctp_tcb *tcb, struct ifaddr *ifa,
return(-1);
}
/* is the negative request already in queue, and not sent */
- if ((aa->sent == 0) &&
+ if ((aa->sent == 0) &&
/* add requested, delete already queued */
(((type == SCTP_ADD_IP_ADDRESS) &&
(aa->ap.aph.ph.param_type == SCTP_DEL_IP_ADDRESS)) ||
@@ -928,7 +928,7 @@ sctp_asconf_queue_add(struct sctp_tcb *tcb, struct ifaddr *ifa,
sctp_asconf_addr_mgmt_ack(tcb, aa->ifa, type, 1);
/* free the entry */
free(aa, M_PCB);
-
+
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
printf("asconf_queue_add: removing 'opposite' queued request\n");
@@ -1312,7 +1312,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset,
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_asconf_ack_chunk)) {
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
- printf("handle_asconf_ack: chunk too small = %xh\n",
+ printf("handle_asconf_ack: chunk too small = %xh\n",
ntohs(cp->ch.chunk_length));
}
#endif /* SCTP_DEBUG */
@@ -1345,7 +1345,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset,
#endif /* SCTP_DEBUG */
return;
}
-
+
if (serial_num != assoc->asconf_seq_out) {
/* got a duplicate/unexpected ASCONF-ACK */
#ifdef SCTP_DEBUG
@@ -1581,7 +1581,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *ep, struct sctp_tcb *tcb,
(ifa->ifa_addr->sa_family != AF_INET)) {
return;
}
-
+
/* put this address on the "pending/do not use yet" list */
/*
* Note: we do this primarily for the subset bind case
@@ -1653,7 +1653,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *ep, struct sctp_tcb *tcb,
return;
}
}
- if ((tcb->asoc.site_scope == 0) &&
+ if ((tcb->asoc.site_scope == 0) &&
(IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) {
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
@@ -1713,7 +1713,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *ep, struct sctp_tcb *tcb,
if (tcb->asoc.peer_supports_asconf) {
/* queue an asconf for this addr */
status = sctp_asconf_queue_add(tcb, ifa, type);
- /*
+ /*
* if queued ok, and in correct state, set the
* ASCONF timer
* if in non-open state, we will set this timer
@@ -1983,7 +1983,7 @@ sctp_set_primary_ip_address(struct ifaddr *ifa) {
struct sctp_tcb *tcb;
/* process for all associations for this endpoint */
LIST_FOREACH(tcb, &ep->sctp_asoc_list, sctp_tcblist) {
- if (!sctp_set_primary_addr(tcb, ifa->ifa_addr)) {
+ if (!sctp_set_primary_addr(tcb, ifa->ifa_addr)) {
/* set primary succeded */
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_ASCONF1) {
@@ -1991,7 +1991,7 @@ sctp_set_primary_ip_address(struct ifaddr *ifa) {
(uint32_t)tcb);
sctp_print_address(ifa->ifa_addr);
}
-#endif /* SCTP_DEBUG */
+#endif /* SCTP_DEBUG */
}
} /* for each tcb */
} /* for each ep */
@@ -2042,10 +2042,10 @@ sctp_find_valid_localaddr(struct sctp_tcb *tcb) {
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr))
/* we skip unspecifed addresses */
continue;
- if ((tcb->asoc.local_scope == 0) &&
+ if ((tcb->asoc.local_scope == 0) &&
(IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)))
continue;
- if ((tcb->asoc.site_scope == 0) &&
+ if ((tcb->asoc.site_scope == 0) &&
(IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr)))
continue;
@@ -2404,7 +2404,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb,
(stcb->asoc.peer_supports_asconf)) {
/* queue an ASCONF DEL_IP_ADDRESS */
status = sctp_asconf_queue_add_sa(stcb, sa, SCTP_DEL_IP_ADDRESS);
- /*
+ /*
* if queued ok, and in correct state,
* set the ASCONF timer
*/
@@ -2484,7 +2484,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb,
while (ph != NULL) {
ptype = ntohs(ph->param_type);
plen = ntohs(ph->param_length);
- if ((ptype == SCTP_IPV6_ADDRESS) &&
+ if ((ptype == SCTP_IPV6_ADDRESS) &&
(sa->sa_family == AF_INET6)) {
/* get the entire IPv6 address param */
#ifdef SCTP_DEBUG
@@ -2612,7 +2612,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb,
}
}
}
-
+
/*
* makes sure that the current kernel address list is consistent
@@ -2647,7 +2647,7 @@ sctp_check_address_list_all(struct sctp_tcb *stcb,
} /* end foreach ifa */
} /* end foreach ifn */
}
-
+
/*
* validates an init-ack chunk (from a cookie-echo) with current addresses
* adds addresses from the init-ack into our local address list, if needed
@@ -2669,9 +2669,9 @@ sctp_check_address_list(struct sctp_tcb *stcb,
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) {
/* bound all case */
- sctp_check_address_list_all(stcb, m, offset, length,
+ sctp_check_address_list_all(stcb, m, offset, length,
local_scope, site_scope,
- ipv4_scope, loopback_scope);
+ ipv4_scope, loopback_scope);
} else {
/* subset bound case */
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_DO_ASCONF) {
View
4 kame/sys/netinet/sctp_asconf.h
@@ -1,4 +1,4 @@
-/* $KAME: sctp_asconf.h,v 1.2 2002/05/20 05:50:02 itojun Exp $ */
+/* $KAME: sctp_asconf.h,v 1.3 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_asconf.h,v 1.15 2002/04/02 15:34:44 lei Exp */
#ifndef _NETINET_SCTP_ASCONF_H_
@@ -68,7 +68,7 @@ extern void
sctp_set_primary_ip_address(struct ifaddr *ifa);
extern void
-sctp_check_address_list(struct sctp_tcb *stcb,
+sctp_check_address_list(struct sctp_tcb *stcb,
struct mbuf *m, int offset, int length,
uint16_t local_scope, uint16_t site_scope,
uint16_t ipv4_scope, uint16_t loopback_scope);
View
30 kame/sys/netinet/sctp_constants.h
@@ -1,4 +1,4 @@
-/* $KAME: sctp_constants.h,v 1.2 2002/05/20 05:50:02 itojun Exp $ */
+/* $KAME: sctp_constants.h,v 1.3 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_constants.h,v 1.61 2002/04/04 16:53:46 randall Exp */
#ifndef __sctp_constants_h__
@@ -74,8 +74,8 @@
#endif
#define SCTP_CWND_POSTS_LIST 256
-/*
- * the SCTP protocol signature
+/*
+ * the SCTP protocol signature
* this includes the version number encoded in the last 4 bits
* of the signature.
*/
@@ -121,8 +121,8 @@
#define SCTP_DATA 0x00
#define SCTP_INITIATION 0x01
#define SCTP_INITIATION_ACK 0x02
-#define SCTP_SELECTIVE_ACK 0x03
-#define SCTP_HEARTBEAT_REQUEST 0x04
+#define SCTP_SELECTIVE_ACK 0x03
+#define SCTP_HEARTBEAT_REQUEST 0x04
#define SCTP_HEARTBEAT_ACK 0x05
#define SCTP_ABORT_ASSOCIATION 0x06
#define SCTP_SHUTDOWN 0x07
@@ -352,7 +352,7 @@
#define SCTP_DEF_MAX_SHUTDOWN (180*hz)
-/* This is how long a secret lives, NOT how long a cookie lives
+/* This is how long a secret lives, NOT how long a cookie lives
* how many ticks the current secret will live.
*/
#define SCTP_DEFAULT_SECRET_LIFE (3600 * hz)
@@ -375,9 +375,9 @@
#define SCTP_MAX_OUTSTANDING_DG 10000
-/* This constant (SCTP_MAX_READBUFFER) define
+/* This constant (SCTP_MAX_READBUFFER) define
* how big the read/write buffer is
- * when we enter the fd event notification
+ * when we enter the fd event notification
* the buffer is put on the stack, so the bigger
* it is the more stack you chew up, however it
* has got to be big enough to handle the bigest
@@ -424,7 +424,7 @@
#define SCTP_DEBUG_NOISY 0x00040000
/* What sender needs to see to avoid SWS or we consider peers rwnd 0 */
-#define SCTP_SWS_SENDER_DEF 1420
+#define SCTP_SWS_SENDER_DEF 1420
/*
* SWS is scaled to the sb_hiwat of the socket.
@@ -438,7 +438,7 @@
#define SCTP_MIN_RWND 1500
#define SCTP_WINDOW_MIN 1500 /* smallest rwnd can be */
-#define SCTP_WINDOW_MAX 1048576 /* biggest I can grow rwnd to
+#define SCTP_WINDOW_MAX 1048576 /* biggest I can grow rwnd to
* My playing around suggests a
* value greater than 64k does not
* do much, I guess via the kernel
@@ -456,7 +456,7 @@
* size to. This governs what is the
* largest size we will use, of course
* PMTU will raise this up to
- * the largest interface MTU or the
+ * the largest interface MTU or the
* ceiling below if there is no
* SIOCGIFMTU.
*/
@@ -540,11 +540,11 @@
#define SCTP_DUPTSN_RECVD 7 /* XX */
#define SCTP_HB_RECV 8 /* XX */
#define SCTP_HB_ACK_RECV 9 /* XX */
-#define SCTP_HB_SENT 10 /* XX */
+#define SCTP_HB_SENT 10 /* XX */
#define SCTP_WINDOW_PROBES 11 /* XX */
#define SCTP_DATA_DG_RECV 12 /* XX */
#define SCTP_TMIT_TIMER 13 /* XX */
-#define SCTP_RECV_TIMER 14 /* XX */
+#define SCTP_RECV_TIMER 14 /* XX */
#define SCTP_HB_TIMER 15 /* XX */
#define SCTP_FAST_RETRAN 16 /* XX */
#define SCTP_TIMERS_EXP 17 /* XX */
@@ -568,7 +568,7 @@
#define SCTP_CWND_INCRS 35 /* XX */
-/*
+/*
* This value defines the number of vtag block time wait entry's
* per list element. Each entry will take 2 4 byte ints (and of
* course the overhead of the next pointer as well). Using 15 as
@@ -605,7 +605,7 @@
#define SCTP_TIME_WAIT 480
/*
- * For U-SCTP
+ * For U-SCTP
*/
#define SCTP_STRM_RELIABLE 0
#define SCTP_STRM_UNRELIABLE 1
View
198 kame/sys/netinet/sctp_crc32.c
@@ -1,4 +1,4 @@
-/* $KAME: sctp_crc32.c,v 1.2 2002/05/20 05:50:02 itojun Exp $ */
+/* $KAME: sctp_crc32.c,v 1.3 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_crc32.c,v 1.12 2002/04/02 15:34:44 lei Exp */
/*
@@ -39,104 +39,104 @@
#ifndef SCTP_USE_ADLER32
-#define SCTP_CRC32C_POLY 0x1EDC6F41
-#define SCTP_CRC32C(c,d) (c=(c>>8)^sctp_crc_c[(c^(d))&0xFF])
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Copyright 2001, D. Otis. Use this program, code or tables */
-/* extracted from it, as desired without restriction. */
-/* */
-/* 32 Bit Reflected CRC table generation for SCTP. */
-/* To accommodate serial byte data being shifted out least */
-/* significant bit first, the table's 32 bit words are reflected */
-/* which flips both byte and bit MS and LS positions. The CRC */
-/* is calculated MS bits first from the perspective of the serial*/
-/* stream. The x^32 term is implied and the x^0 term may also */
-/* be shown as +1. The polynomial code used is 0x1EDC6F41. */
-/* Castagnoli93 */
-/* x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+x^19+x^18+x^14+x^13+ */
-/* x^11+x^10+x^9+x^8+x^6+x^0 */
-/* Guy Castagnoli Stefan Braeuer and Martin Herrman */
-/* "Optimization of Cyclic Redundancy-Check Codes */
-/* with 24 and 32 Parity Bits", */
-/* IEEE Transactions on Communications, Vol.41, No.6, June 1993 */
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-unsigned long sctp_crc_c[256] = {
- 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L,
- 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL,
- 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL,
- 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L,
- 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL,
- 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L,
- 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L,
- 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL,
- 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL,
- 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L,
- 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L,
- 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL,
- 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L,
- 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL,
- 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL,
- 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L,
- 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L,
- 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L,
- 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L,
- 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L,
- 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L,
- 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L,
- 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L,
- 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L,
- 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L,
- 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L,
- 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L,
- 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L,
- 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L,
- 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L,
- 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L,
- 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L,
- 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL,
- 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L,
- 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L,
- 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL,
- 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L,
- 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL,
- 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL,
- 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L,
- 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L,
- 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL,
- 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL,
- 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L,
- 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL,
- 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L,
- 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L,
- 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL,
- 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L,
- 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL,
- 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL,
- 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L,
- 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL,
- 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L,
- 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L,
- 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL,
- 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL,
- 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L,
- 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L,
- 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL,
- 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L,
- 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL,
- 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL,
- 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L,
-};
+#define SCTP_CRC32C_POLY 0x1EDC6F41
+#define SCTP_CRC32C(c,d) (c=(c>>8)^sctp_crc_c[(c^(d))&0xFF])
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* Copyright 2001, D. Otis. Use this program, code or tables */
+/* extracted from it, as desired without restriction. */
+/* */
+/* 32 Bit Reflected CRC table generation for SCTP. */
+/* To accommodate serial byte data being shifted out least */
+/* significant bit first, the table's 32 bit words are reflected */
+/* which flips both byte and bit MS and LS positions. The CRC */
+/* is calculated MS bits first from the perspective of the serial*/
+/* stream. The x^32 term is implied and the x^0 term may also */
+/* be shown as +1. The polynomial code used is 0x1EDC6F41. */
+/* Castagnoli93 */
+/* x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+x^19+x^18+x^14+x^13+ */
+/* x^11+x^10+x^9+x^8+x^6+x^0 */
+/* Guy Castagnoli Stefan Braeuer and Martin Herrman */
+/* "Optimization of Cyclic Redundancy-Check Codes */
+/* with 24 and 32 Parity Bits", */
+/* IEEE Transactions on Communications, Vol.41, No.6, June 1993 */
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+unsigned long sctp_crc_c[256] = {
+ 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L,
+ 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL,
+ 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL,
+ 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L,
+ 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL,
+ 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L,
+ 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L,
+ 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL,
+ 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL,
+ 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L,
+ 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L,
+ 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL,
+ 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L,
+ 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL,
+ 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL,
+ 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L,
+ 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L,
+ 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L,
+ 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L,
+ 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L,
+ 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L,
+ 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L,
+ 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L,
+ 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L,
+ 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L,
+ 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L,
+ 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L,
+ 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L,
+ 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L,
+ 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L,
+ 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L,
+ 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L,
+ 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL,
+ 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L,
+ 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L,
+ 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL,
+ 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L,
+ 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL,
+ 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL,
+ 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L,
+ 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L,
+ 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL,
+ 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL,
+ 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L,
+ 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL,
+ 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L,
+ 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L,
+ 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL,
+ 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L,
+ 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL,
+ 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL,
+ 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L,
+ 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL,
+ 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L,
+ 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L,
+ 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL,
+ 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL,
+ 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L,
+ 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L,
+ 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL,
+ 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L,
+ 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL,
+ 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL,
+ 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L,
+};
u_int32_t
update_crc32(u_int32_t crc32,
- unsigned char *buffer,
- unsigned int length)
-{
- int i;
- for (i = 0; i < length; i++){
- SCTP_CRC32C(crc32, buffer[i]);
- }
+ unsigned char *buffer,
+ unsigned int length)
+{
+ int i;
+ for (i = 0; i < length; i++){
+ SCTP_CRC32C(crc32, buffer[i]);
+ }
return(crc32);
}
@@ -153,7 +153,7 @@ sctp_csum_finalize(u_int32_t crc32)
/*
* For BIG-ENDIAN.. aka Motorola byte order the result is in
* little-endian form. So we must manually swap the bytes. Then
- * we can call htonl() which does nothing...
+ * we can call htonl() which does nothing...
*/
byte0 = result & 0x000000ff;
byte1 = (result >> 8) & 0x000000ff;
@@ -173,9 +173,9 @@ sctp_csum_finalize(u_int32_t crc32)
crc32 = result;
#endif
return(crc32);
-}
+}
-#endif
+#endif
View
4 kame/sys/netinet/sctp_header.h
@@ -1,4 +1,4 @@
-/* $KAME: sctp_header.h,v 1.2 2002/05/20 05:50:02 itojun Exp $ */
+/* $KAME: sctp_header.h,v 1.3 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_header.h,v 1.34 2002/04/03 21:10:19 lei Exp */
#ifndef __sctp_header_h__
@@ -316,7 +316,7 @@ struct sctp_cookie_while_shutting_down {
struct sctp_shutdown_complete_msg {
struct sctphdr sh;
- struct sctp_shutdown_complete_chunk shut_cmp;
+ struct sctp_shutdown_complete_chunk shut_cmp;
};
/* draft-ietf-tsvwg-addip-sctp */
View
178 kame/sys/netinet/sctp_indata.c
@@ -1,4 +1,4 @@
-/* $KAME: sctp_indata.c,v 1.4 2002/05/24 07:40:23 itojun Exp $ */
+/* $KAME: sctp_indata.c,v 1.5 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_indata.c,v 1.124 2002/04/04 18:48:39 randall Exp */
/*
@@ -135,10 +135,10 @@ sctp_set_rwnd(struct sctp_tcb *stcb,
asoc->size_on_delivery_queue,
asoc->size_on_reasm_queue,
asoc->size_on_all_streams);
- }
+ }
#endif
- asoc->my_rwnd = sctp_sbspace(&stcb->sctp_socket->so_rcv) -
- (asoc->size_on_delivery_queue +
+ asoc->my_rwnd = sctp_sbspace(&stcb->sctp_socket->so_rcv) -
+ (asoc->size_on_delivery_queue +
asoc->size_on_reasm_queue +
asoc->size_on_all_streams);
if(asoc->my_rwnd < 0)
@@ -183,9 +183,9 @@ sctp_build_ctl(struct sctp_tcb *stcb,
outinfo = (struct sctp_sndrcvinfo *)((caddr_t)cmh + CMSG_ALIGN(sizeof(struct cmsghdr)));
cmh->cmsg_level = IPPROTO_SCTP;
cmh->cmsg_type = SCTP_SNDRCV;
- cmh->cmsg_len = (sizeof(struct sctp_sndrcvinfo) +
+ cmh->cmsg_len = (sizeof(struct sctp_sndrcvinfo) +
CMSG_ALIGN(sizeof(struct cmsghdr)));
- outinfo->sinfo_stream = chk->rec.data.stream_number;
+ outinfo->sinfo_stream = chk->rec.data.stream_number;
outinfo->sinfo_ssn = chk->rec.data.stream_seq;
if (chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) {
outinfo->sinfo_flags = MSG_UNORDERED;
@@ -285,9 +285,9 @@ sctp_deliver_data(struct sctp_tcb *stcb,
TAILQ_INSERT_TAIL(&asoc->delivery_queue,chk,sctp_next);
asoc->size_on_delivery_queue += chk->send_size;
asoc->cnt_on_delivery_queue++;
- }
+ }
if(asoc->fragmented_delivery_inprogress){
- /* oh oh, fragmented delivery in progress
+ /* oh oh, fragmented delivery in progress
* return out of here.
*/
#ifdef SCTP_DEBUG
@@ -310,9 +310,9 @@ sctp_deliver_data(struct sctp_tcb *stcb,
asoc->cnt_on_delivery_queue = 0;
return(0);
}
-
- if((!stcb->on_toqueue) &&
- (stcb->sctp_socket->so_rcv.sb_cc >=
+
+ if((!stcb->on_toqueue) &&
+ (stcb->sctp_socket->so_rcv.sb_cc >=
(stcb->sctp_ep->sctp_ep.sctp_sws_receiver >> 1))){
/* no room for anything. */
#ifdef SCTP_DEBUG
@@ -369,7 +369,7 @@ sctp_deliver_data(struct sctp_tcb *stcb,
chk->data->m_flags |= M_EOR;
}else{
/* Add the flag to the LAST mbuf in the chain */
- m = chk->data;
+ m = chk->data;
while(m->m_next != NULL){
m = m->m_next;
}
@@ -405,7 +405,7 @@ sctp_deliver_data(struct sctp_tcb *stcb,
}
goto skip;
}
- if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv,
+ if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv,
to, chk->data, control)) {
/* Gak not enough room */
if(control){
@@ -505,8 +505,8 @@ sctp_service_reassembly(struct sctp_tcb *stcb,
return;
}
do{
- if((!stcb->on_toqueue) &&
- (stcb->sctp_socket->so_rcv.sb_cc >=
+ if((!stcb->on_toqueue) &&
+ (stcb->sctp_socket->so_rcv.sb_cc >=
(stcb->sctp_ep->sctp_ep.sctp_sws_receiver >> 1))){
TAILQ_INSERT_TAIL(&stcb->sctp_ep->sctp_queue_list,stcb,sctp_toqueue);
stcb->on_toqueue = 1;
@@ -534,7 +534,7 @@ sctp_service_reassembly(struct sctp_tcb *stcb,
}
stream_no = chk->rec.data.stream_number;
nxt_todel = asoc->strmin[stream_no].last_sequence_delivered + 1;
- if((nxt_todel != chk->rec.data.stream_seq) &&
+ if((nxt_todel != chk->rec.data.stream_seq) &&
((chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED) == 0)){
/* Not the next sequence to deliver in its stream OR unordered*/
if(cntDel){
@@ -578,7 +578,7 @@ sctp_service_reassembly(struct sctp_tcb *stcb,
chk->data->m_flags |= M_EOR;
}else{
/* Add the flag to the LAST mbuf in the chain */
- m = chk->data;
+ m = chk->data;
while(m->m_next != NULL){
m = m->m_next;
}
@@ -615,7 +615,7 @@ sctp_service_reassembly(struct sctp_tcb *stcb,
sctp_sorwakeup(stcb->sctp_ep,stcb->sctp_socket);
return;
}
- if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv,
+ if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv,
to, chk->data, control)) {
/* Gak not enough room */
if(control){
@@ -661,7 +661,7 @@ sctp_service_reassembly(struct sctp_tcb *stcb,
if(asoc->fragmented_delivery_inprogress == 0){
/* Now lets see if we can deliver the next one on the stream */
u_int16_t nxt_todel;
- struct sctp_stream_in *strm;
+ struct sctp_stream_in *strm;
strm = &asoc->strmin[stream_no];
nxt_todel = strm->last_sequence_delivered + 1;
@@ -706,7 +706,7 @@ sctp_service_reassembly(struct sctp_tcb *stcb,
-static void
+static void
sctp_queue_data_to_stream(struct sctp_tcb *stcb,
struct sctp_association *asoc,
struct sctp_tmit_chunk *chk,
@@ -715,7 +715,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
/* Queue the chunk either right into the socket
* buffer if it is the next one to go OR put it
* in the correct place in the delivery queue.
- * If we do append to the so_buf, keep doing so
+ * If we do append to the so_buf, keep doing so
* until we are out of order.
* One big question still remains, what do I do
* when the socket buffer is FULL??
@@ -759,7 +759,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
*abort_flag = 1;
return;
-
+
}
if (nxt_todel == chk->rec.data.stream_seq) {
/* can be delivered right away */
@@ -859,7 +859,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
(strm->next_spoke.tqe_prev == NULL)){
/* Insert the pr-stream on the wheel of unrel streams with
* pending data
- */
+ */
TAILQ_INSERT_HEAD(&asoc->unrel_wheel,strm,next_spoke);
}
}else{
@@ -940,7 +940,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb,
prev = next = NULL;
cum_ackp1 = asoc->tsn_last_delivered + 1;
- if(TAILQ_EMPTY(&asoc->reasmqueue)){
+ if(TAILQ_EMPTY(&asoc->reasmqueue)){
/* This is the first one on the queue */
TAILQ_INSERT_HEAD(&asoc->reasmqueue,chk,sctp_next);
/* we do not check for delivery of anything when
@@ -1136,7 +1136,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb,
*/
if(next->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG){
/* Insert chk MUST be a last fragment */
- if((chk->rec.data.rcv_flags&SCTP_DATA_FRAG_MASK)
+ if((chk->rec.data.rcv_flags&SCTP_DATA_FRAG_MASK)
!= SCTP_DATA_LAST_FRAG){
#ifdef SCTP_DEBUG
if(sctp_debug_on & SCTP_DEBUG_INDATA1){
@@ -1221,7 +1221,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb,
((nxt_todel == chk->rec.data.stream_seq) ||
(chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED))){
/* Yep the first one is here and its
- * ok to deliver but should we?
+ * ok to deliver but should we?
*/
if((TAILQ_EMPTY(&asoc->delivery_queue)) &&
((sctp_is_all_msg_on_reasm(asoc,&tsize)) ||
@@ -1259,7 +1259,7 @@ sctp_does_chk_belong_to_reasm(struct sctp_association *asoc,
{
struct sctp_tmit_chunk *at;
u_int32_t tsn_est;
- TAILQ_FOREACH(at,&asoc->reasmqueue,sctp_next){
+ TAILQ_FOREACH(at,&asoc->reasmqueue,sctp_next){
if(compare_with_wrap(chk->rec.data.TSN_seq,at->rec.data.TSN_seq,MAX_TSN)){
/* is it one bigger? */
tsn_est = at->rec.data.TSN_seq + 1;
@@ -1282,7 +1282,7 @@ sctp_does_chk_belong_to_reasm(struct sctp_association *asoc,
/* Software error since I have a dup? */
return(1);
}else{
- /* Ok, 'at' is larger than new chunk but does it
+ /* Ok, 'at' is larger than new chunk but does it
* need to be right before it.
*/
tsn_est = chk->rec.data.TSN_seq + 1;
@@ -1316,7 +1316,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
u_int32_t tsn,gap;
int full_queue_flag=0;
u_int16_t strmno, strmseq;
-
+
tsn = ntohl(ch->dp.tsn);
if(compare_with_wrap(asoc->cumulative_tsn,tsn,MAX_TSN)){
/* It is a duplicate */
@@ -1372,11 +1372,11 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
full_queue_flag = 1;
}
/* now do the tests */
- if((asoc->my_rwnd <= 0) &&
- (sctp_sbspace(&stcb->sctp_socket->so_rcv) >=
+ if((asoc->my_rwnd <= 0) &&
+ (sctp_sbspace(&stcb->sctp_socket->so_rcv) >=
(chk_length - sizeof(struct sctp_data_chunk))) &&
(full_queue_flag == 0)
- ){
+ ){
/* When we have NO room in the rwnd but room
* in the socket buffer for more data we will
* only accept the NEXT sequence number above
@@ -1409,7 +1409,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
if(ntohs(ch->dp.stream_id) >= asoc->streamincnt){
struct sctp_paramhdr *phdr;
struct mbuf *mb;
-
+
MGETHDR(mb,M_DONTWAIT,MT_DATA);
if(mb != NULL){
/* add some space up front so prepend will work well */
@@ -1418,7 +1418,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
/* Error causes are just param's and this one
* has two back to back phdr, one with the
* error type and size, the other with
- * the streamid and a rsvd
+ * the streamid and a rsvd
*/
mb->m_pkthdr.len = mb->m_len = (sizeof(struct sctp_paramhdr) * 2);
phdr->param_type = htons(SCTP_CAUSE_INV_STRM);
@@ -1441,7 +1441,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
* We of course only validate the FIRST fragment so the
* bit must be set.
*/
- strmno = ntohs(ch->dp.stream_id);
+ strmno = ntohs(ch->dp.stream_id);
strmseq = ntohs(ch->dp.stream_sequence);;
if((ch->ch.chunk_flags & SCTP_DATA_FIRST_FRAG) &&
((ch->ch.chunk_flags & SCTP_DATA_UNORDERED) == 0) &&
@@ -1546,7 +1546,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
if((chk->rec.data.rcv_flags & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG){
/* First a sanity check */
if(asoc->fragmented_delivery_inprogress){
- /* Ok, we have a fragmented delivery in progress
+ /* Ok, we have a fragmented delivery in progress
* if this chunk is next to deliver OR belongs in
* our view to the reassembly, the peer is evil
* or broken.
@@ -1574,7 +1574,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
}
}else{
if(!TAILQ_EMPTY(&asoc->reasmqueue)){
- /* Reassembly queue is NOT empty
+ /* Reassembly queue is NOT empty
* validate that this chk does not need to
* be in reasembly queue. If it does then
* our peer is broken or evil.
@@ -1591,7 +1591,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb,
}
if(chk->rec.data.rcv_flags & SCTP_DATA_UNORDERED){
/* queue directly into socket buffer */
- sctp_deliver_data(stcb,asoc,chk);
+ sctp_deliver_data(stcb,asoc,chk);
sctp_sorwakeup(stcb->sctp_ep,stcb->sctp_socket);
}else{
sctp_queue_data_to_stream(stcb,asoc,chk,abort_flag);
@@ -1621,9 +1621,9 @@ static void
sctp_sack_check(struct sctp_tcb *stcb,int ok_to_sack)
{
/* Now we also need to check the mapping array
- * in a couple of ways.
+ * in a couple of ways.
* 1) Did we move the cum-ack point?
- */
+ */
struct sctp_association *asoc;
int i,at;
asoc = &stcb->asoc;
@@ -1670,14 +1670,14 @@ sctp_sack_check(struct sctp_tcb *stcb,int ok_to_sack)
}
asoc->mapping_array_base_tsn += (slide_from << 3);
}
- /* Now we need to see if we need to
+ /* Now we need to see if we need to
* queue a sack or just start the timer (if allowed).
*/
if(ok_to_sack){
if((asoc->state&SCTP_STATE_MASK) == SCTP_STATE_SHUTDOWN_SENT){
/* Ok special case, in SHUTDOWN-SENT case.
* here we maker sure SACK timer is off and
- * instead send a SHUTDOWN and a SACK
+ * instead send a SHUTDOWN and a SACK
*/
if(callout_pending(&stcb->asoc.dack_timer.timer)){
sctp_timer_stop(SCTP_TIMER_TYPE_RECV,
@@ -1731,7 +1731,7 @@ sctp_service_queues(struct sctp_tcb *stcb,
*/
do{
if((!stcb->on_toqueue) &&
- (stcb->sctp_socket->so_rcv.sb_cc >=
+ (stcb->sctp_socket->so_rcv.sb_cc >=
(stcb->sctp_ep->sctp_ep.sctp_sws_receiver >> 1))){
/* no room */
TAILQ_INSERT_TAIL(&stcb->sctp_ep->sctp_queue_list,stcb,sctp_toqueue);
@@ -1769,7 +1769,7 @@ sctp_service_queues(struct sctp_tcb *stcb,
* just in case we can't deliver.
*/
- /* Before we start though either all of the
+ /* Before we start though either all of the
* message should be here or 1/4 the socket buffer
* max or nothing on the delivery queue and something
* can be delivered.
@@ -1820,7 +1820,7 @@ sctp_process_data(struct mbuf *m,
/*
* process all DATA chunks...
*/
-
+
#ifdef SCTP_DEBUG
if(sctp_debug_on & SCTP_DEBUG_INPUT1){
printf("In process data off:%d length:%d iphlen:%d ch->type:%d\n",
@@ -1892,14 +1892,14 @@ sctp_process_data(struct mbuf *m,
SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_last_rcvd);
}
/* now service all of the reassm queue and delivery queue */
- sctp_service_queues(stcb,asoc);
+ sctp_service_queues(stcb,asoc);
if((asoc->state&SCTP_STATE_MASK) == SCTP_STATE_SHUTDOWN_SENT){
/* Assure that we ack right away by making
* sure that a d-ack timer is running. So the
* sack_check will send a sack.
*/
sctp_timer_start(SCTP_TIMER_TYPE_RECV,
- stcb->sctp_ep,
+ stcb->sctp_ep,
stcb,
netp);
}
@@ -1959,14 +1959,14 @@ sctp_handle_segments(struct sctp_tcb *stcb,
last_frag_high = frag_end + last_tsn;
}else{
/* now lets see if we need to reset the queue
- * due to a out-of-order SACK fragment
+ * due to a out-of-order SACK fragment
*/
- if(compare_with_wrap(frag_strt+last_tsn,last_frag_high,MAX_TSN)){
+ if(compare_with_wrap(frag_strt+last_tsn,last_frag_high,MAX_TSN)){
/* if the new frag starts after the last TSN frag covered, we are ok */
/* and this one is beyond the last one */
;
}else{
- /* ok, they have reset us, so we need to reset the queue
+ /* ok, they have reset us, so we need to reset the queue
* this will cause extra hunting but hey, they chose the performance
* hit when they failed to order there gaps..
*/
@@ -2006,8 +2006,8 @@ sctp_handle_segments(struct sctp_tcb *stcb,
}
}
}
- if((tp1->sent <= SCTP_DATAGRAM_RESEND) &&
- (tp1->sent != SCTP_DATAGRAM_UNSENT) &&
+ if((tp1->sent <= SCTP_DATAGRAM_RESEND) &&
+ (tp1->sent != SCTP_DATAGRAM_UNSENT) &&
(compare_with_wrap(tp1->rec.data.TSN_seq,asoc->this_sack_highest_gap,MAX_TSN))){
asoc->this_sack_highest_gap = tp1->rec.data.TSN_seq;
if(primary_flag_set){
@@ -2053,9 +2053,9 @@ sctp_check_for_revoked(struct sctp_association *asoc,
*/
if(tp1->sent == SCTP_DATAGRAM_ACKED){
/* it has been revoked */
- /* We do NOT add back to flight size here since
+ /* We do NOT add back to flight size here since
* it is really NOT in flight. Resend (when/if it occurs
- * will add to flight size
+ * will add to flight size
*/
tp1->sent = SCTP_DATAGRAM_SENT;
}else if(tp1->sent == SCTP_DATAGRAM_MARKED){
@@ -2065,7 +2065,7 @@ sctp_check_for_revoked(struct sctp_association *asoc,
}
if(tp1->sent == SCTP_DATAGRAM_UNSENT)
break;
- tp1 = TAILQ_NEXT(tp1,sctp_next);
+ tp1 = TAILQ_NEXT(tp1,sctp_next);
}
}
@@ -2096,11 +2096,11 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *tcb,
if(tp1->sent >= SCTP_DATAGRAM_RESEND){
/* either a RESEND, ACKED, or MARKED */
/* skip */
- tp1 = TAILQ_NEXT(tp1,sctp_next);
+ tp1 = TAILQ_NEXT(tp1,sctp_next);
continue;
}
if(compare_with_wrap(tp1->rec.data.TSN_seq,asoc->this_sack_highest_gap,MAX_TSN)){
- tp1 = TAILQ_NEXT(tp1,sctp_next);
+ tp1 = TAILQ_NEXT(tp1,sctp_next);
continue;
}
if(primary_switch_active && (strike_enabled == 0)){
@@ -2118,7 +2118,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *tcb,
continue;
}
}
- if(double_switch_active &&
+ if(double_switch_active &&
(compare_with_wrap(asoc->primary_destination->next_tsn_at_change,
tp1->rec.data.TSN_seq,
MAX_TSN))){
@@ -2157,7 +2157,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *tcb,
alt->ref_count++;
}
}
- tp1 = TAILQ_NEXT(tp1,sctp_next);
+ tp1 = TAILQ_NEXT(tp1,sctp_next);
} /* while(tp1) */
}
@@ -2182,15 +2182,15 @@ sctp_try_advance_peer_ack_point(struct sctp_tcb *stcb,
break;
}
if((tp1->flags & SCTP_PR_SCTP_ENABLED) == 0){
- /* We can't fwd-tsn past any that are reliable
+ /* We can't fwd-tsn past any that are reliable
* aka retransmitted until the asoc fails.
*/
break;
}
- tp2 = TAILQ_NEXT(tp1,sctp_next);
- /*
- * now we got a chunk which is marked for another
- * retransmission to a PR-stream but has run
+ tp2 = TAILQ_NEXT(tp1,sctp_next);
+ /*
+ * now we got a chunk which is marked for another
+ * retransmission to a PR-stream but has run
* out its chances already maybe OR has been
* marked to skip now. Can we skip it if its a
* resend?
@@ -2252,7 +2252,7 @@ sctp_try_advance_peer_ack_point(struct sctp_tcb *stcb,
(int)asoc->total_output_queue_size,
(int)asoc->total_output_mbuf_queue_size);
}
-#endif
+#endif
m_freem(tp1->data);
sctp_sowwakeup(stcb->sctp_ep,stcb->sctp_socket);
@@ -2313,7 +2313,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
* been sending.
*/
- /* we take any chance we can to service our queues
+ /* we take any chance we can to service our queues
* since we cannot get awoken when the socket
* is read from :<
*/
@@ -2414,7 +2414,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
/* stop any timers */
TAILQ_FOREACH(net,&asoc->nets,sctp_next){
sctp_timer_stop(SCTP_TIMER_TYPE_SEND,
- stcb->sctp_ep,
+ stcb->sctp_ep,
stcb,
net);
net->partial_bytes_acked = 0;
@@ -2489,7 +2489,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
if(accum_moved){
TAILQ_FOREACH(net,&asoc->nets,sctp_next){
sctp_timer_stop(SCTP_TIMER_TYPE_SEND,
- stcb->sctp_ep,
+ stcb->sctp_ep,
stcb,
net);
}
@@ -2584,7 +2584,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
(int)asoc->total_output_queue_size,
(int)asoc->total_output_mbuf_queue_size);
}
-#endif
+#endif
if(tp1->data)
m_freem(tp1->data);
@@ -2616,7 +2616,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
/* update cwnd */
/******************************/
TAILQ_FOREACH(net,&asoc->nets,sctp_next){
- /* if nothing was acked on this destination
+ /* if nothing was acked on this destination
* skip it.
*/
if(net->net_ack == 0)
@@ -2714,7 +2714,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
/* stop any timers */
TAILQ_FOREACH(net,&asoc->nets,sctp_next){
sctp_timer_stop(SCTP_TIMER_TYPE_SEND,
- stcb->sctp_ep,
+ stcb->sctp_ep,
stcb,
net);
net->flight_size = 0;
@@ -2743,7 +2743,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
return;
}
/* Now here we are going to recycle net_ack for a different
- * use... HEADS UP.
+ * use... HEADS UP.
*/
TAILQ_FOREACH(net,&asoc->nets,sctp_next){
net->net_ack = 0;
@@ -2801,7 +2801,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
}
if(net->flight_size > 0){
sctp_timer_start(SCTP_TIMER_TYPE_SEND,
- stcb->sctp_ep,
+ stcb->sctp_ep,
stcb,
net);
}
@@ -2813,7 +2813,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
/* SWS sender side engages */
asoc->peers_rwnd = 0;
}
- /* Now we must setup so we have a timer up
+ /* Now we must setup so we have a timer up
* for anyone with outstanding data.
*/
TAILQ_FOREACH(net,&asoc->nets,sctp_next){
@@ -2821,13 +2821,13 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb,
int flg;
flg = 0;
TAILQ_FOREACH(chk,&asoc->sent_queue,sctp_next){
- if((chk->whoTo == net) &&
+ if((chk->whoTo == net) &&
(chk->sent < SCTP_DATAGRAM_ACKED)){
/* Not ack'ed and still outstanding to this
* destination.
*/
sctp_timer_start(SCTP_TIMER_TYPE_SEND,
- stcb->sctp_ep,
+ stcb->sctp_ep,
stcb,
net);
flg = 1;
@@ -2871,7 +2871,7 @@ static int
sctp_kick_unrel_reorder_queue(struct sctp_tcb *stcb,
struct sctp_stream_in *strmin)
{
- /* this subroutine tries to deliver any ready msgs
+ /* this subroutine tries to deliver any ready msgs
* from the inqueue of an PR-streams
*/
struct sctp_tmit_chunk *chk,*nchk;
@@ -2883,7 +2883,7 @@ sctp_kick_unrel_reorder_queue(struct sctp_tcb *stcb,
chk = TAILQ_FIRST(&strmin->inqueue);
while(chk){
nchk = TAILQ_NEXT(chk,sctp_next);
- if(compare_with_wrap(asoc->cumulative_tsn,
+ if(compare_with_wrap(asoc->cumulative_tsn,
chk->rec.data.TSN_seq, MAX_TSN) ||
(asoc->cumulative_tsn == chk->rec.data.TSN_seq) ||
(tt == chk->rec.data.stream_seq)) {
@@ -2907,14 +2907,14 @@ sctp_kick_unrel_reorder_queue(struct sctp_tcb *stcb,
/* yep */
break;
}
- }
+ }
if(ret){
/* Update the last sequence delivered */
strmin->last_sequence_delivered = tt - 1;
if(TAILQ_EMPTY(&strmin->inqueue) &&
((strmin->next_spoke.tqe_next != NULL) |
(strmin->next_spoke.tqe_prev != NULL))){
- /* Ok it was on the wheel and
+ /* Ok it was on the wheel and
* has nothing left, remove it.
*/
TAILQ_REMOVE(&asoc->unrel_wheel,strmin,next_spoke);
@@ -2931,7 +2931,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
{
/* ISSUES that MUST be fixed for ECN! When we are the
* sender of the forward TSN, when the SACK comes back
- * that acknowledges the FWD-TSN we must reset the
+ * that acknowledges the FWD-TSN we must reset the
* NONCE sum to match correctly. This will get quite
* tricky since we may have sent more data interveneing and
* must carefully account for what the SACK says on the
@@ -2941,9 +2941,9 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
*/
/* The u-sctp fwd tsn */
- /* here we will perform all the data receiver side steps for
+ /* here we will perform all the data receiver side steps for
* processing FwdTSN, as required in by u-sctp draft:
- *
+ *
* Assume we get FwdTAN(x):
*
* 1) update local cumTSN to x
@@ -2956,7 +2956,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
int i, ret, cnt_gone;
struct sctp_stream_in *strm,*nstrm;
struct sctp_tmit_chunk *chk,*at;
-
+
asoc = &stcb->asoc;
cnt_gone = 0;
if(ntohs(fwd->ch.chunk_length) != sizeof(struct sctp_forward_tsn_chunk)){
@@ -3007,7 +3007,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
if(asoc->fragmented_delivery_inprogress){
sctp_service_reassembly(stcb,asoc);
}
- if(!TAILQ_EMPTY(&asoc->reasmqueue)){
+ if(!TAILQ_EMPTY(&asoc->reasmqueue)){
/* For each one on here see if we need to toss it */
chk = TAILQ_FIRST(&asoc->reasmqueue);
while(chk){
@@ -3022,7 +3022,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
MAX_TSN)){
/* advance stuff here, hmm we may have been
* in a partial delivery thats a problem.
- */
+ */
asoc->tsn_last_delivered = chk->rec.data.TSN_seq;
asoc->str_of_pdapi = chk->rec.data.stream_number;
asoc->ssn_of_pdapi = chk->rec.data.stream_seq;
@@ -3034,7 +3034,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
/* If we are delivering to the PD-API and the last chunk is
* being dumped, we can turn of the PD-API
*/
- if((asoc->fragmented_delivery_inprogress) &&
+ if((asoc->fragmented_delivery_inprogress) &&
(chk->rec.data.rcv_flags & SCTP_DATA_LAST_FRAG)
){
asoc->fragmented_delivery_inprogress = 0;
@@ -3098,10 +3098,10 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
chk = at;
}
}
- if((asoc->fragmented_delivery_inprogress) &&
+ if((asoc->fragmented_delivery_inprogress) &&
(cnt_gone)){
/* Ok we removed cnt_gone chunks in the PD-API queue that
- * were being delivered. So now we must turn off the
+ * were being delivered. So now we must turn off the
* flag.
*/
asoc->fragmented_delivery_inprogress = 0;
View
164 kame/sys/netinet/sctp_input.c
@@ -1,4 +1,4 @@
-/* $KAME: sctp_input.c,v 1.4 2002/06/08 21:42:38 itojun Exp $ */
+/* $KAME: sctp_input.c,v 1.5 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_input.c,v 1.189 2002/04/04 18:37:12 randall Exp */
/*
@@ -38,7 +38,7 @@
#include "opt_inet6.h"
#include "opt_inet.h"
#endif
-#if defined(__NetBSD__)
+#if defined(__NetBSD__)
#include "opt_inet.h"
#endif
#ifndef __OpenBSD__
@@ -157,7 +157,7 @@ static void
sctp_handle_init(struct mbuf *m, struct sctp_init_chunk *cp,
struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct sctp_nets *netp,
- int iphlen)
+ int iphlen)
{
struct sctp_init *init;
struct sctp_association *assoc;
@@ -184,25 +184,25 @@ sctp_handle_init(struct mbuf *m, struct sctp_init_chunk *cp,
/* validate parameters */
if (init->initiate_tag == 0) {
/* protocol error... send abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(inp, stcb, m, iphlen, op_err);
return;
}
if (ntohl(init->a_rwnd) < SCTP_MIN_RWND) {
/* invalid parameter... send abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(inp, stcb, m, iphlen, op_err);
return;
}
if (init->num_inbound_streams == 0) {
/* protocol error... send abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(inp, stcb, m, iphlen, op_err);
return;
}
if (init->num_outbound_streams == 0) {
/* protocol error... send abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(inp, stcb, m, iphlen, op_err);
return;
}
@@ -241,7 +241,7 @@ extern struct sctp_epinfo sctppcbinfo;
static int
sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
- struct sctp_nets *netp)
+ struct sctp_nets *netp)
{
struct sctp_init *init;
struct sctp_association *assoc;
@@ -266,7 +266,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
outs = &assoc->strmout[i];
chk = TAILQ_FIRST(&outs->outqueue);
while (chk) {
- TAILQ_REMOVE(&outs->outqueue, chk,
+ TAILQ_REMOVE(&outs->outqueue, chk,
sctp_next);
sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, chk);
if (chk->data) {
@@ -274,7 +274,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
chk->data = NULL;
}
sctp_free_remote_addr(chk->whoTo);
- chk->whoTo = NULL;
+ chk->whoTo = NULL;
chk->asoc = NULL;
/* Free the chunk */
#if defined(__FreeBSD__)
@@ -313,7 +313,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
free(assoc->strmin,M_PCB);
}
assoc->strmin = (struct sctp_stream_in *)malloc(
- (assoc->streamincnt *
+ (assoc->streamincnt *
sizeof(struct sctp_stream_in)),
M_PCB,
M_NOWAIT);
@@ -363,7 +363,7 @@ static int
sctp_process_init_ack(struct mbuf *m, int offset,
struct sctp_init_ack_chunk *cp,
struct sctp_tcb *stcb, struct sctp_nets *netp,
- int iphlen)
+ int iphlen)
{
struct sctp_association *assoc;
struct mbuf *op_err;
@@ -373,11 +373,11 @@ sctp_process_init_ack(struct mbuf *m, int offset,
abort_flag = 0;
op_err = NULL;
op_err = sctp_arethere_unrecognized_parameters(m,
- (offset +
+ (offset +
sizeof(struct sctp_init_chunk)),
&abort_flag);
if (abort_flag) {
- /* Send an abort and notify peer */
+ /* Send an abort and notify peer */
if(op_err != NULL){
sctp_abort_association(stcb->sctp_ep,
stcb,
@@ -386,7 +386,7 @@ sctp_process_init_ack(struct mbuf *m, int offset,
/* Just notify (abort_assoc does this if
* we send an abort).
*/
- sctp_abort_notification(stcb,0);
+ sctp_abort_notification(stcb,0);
}
/* No sense in further INIT's since
* we will get the same param back
@@ -400,7 +400,7 @@ sctp_process_init_ack(struct mbuf *m, int offset,
if (retval < 0) {
return(retval);
}
- sz_of_initack = (unsigned int)(ntohs(cp->ch.chunk_length) +
+ sz_of_initack = (unsigned int)(ntohs(cp->ch.chunk_length) +
iphlen +
sizeof(struct sctphdr));
@@ -410,9 +410,9 @@ sctp_process_init_ack(struct mbuf *m, int offset,
(struct sockaddr *)NULL,(int)sz_of_initack)
){
/* Huh, we should abort */
- sctp_abort_notification(stcb,0);
+ sctp_abort_notification(stcb,0);
sctp_free_assoc(stcb->sctp_ep,stcb);
- return(-1);
+ return(-1);
}
if (op_err) {
sctp_queue_op_err(stcb,op_err);
@@ -428,7 +428,7 @@ sctp_process_init_ack(struct mbuf *m, int offset,
* the INIT-ACK, we can abandon the peer, its broke.
*/
if(retval == -3){
- /* We abort with an error of
+ /* We abort with an error of
* missing mandatory param.
*/
struct mbuf *op_err;
@@ -530,7 +530,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *hb,
static void
sctp_handle_abort(struct sctp_abort_chunk *cp, struct sctp_tcb *stcb,
- struct sctp_nets *netp)
+ struct sctp_nets *netp)
{
#ifdef SCTP_DEBUG
if(sctp_debug_on & SCTP_DEBUG_INPUT2){
@@ -541,7 +541,7 @@ sctp_handle_abort(struct sctp_abort_chunk *cp, struct sctp_tcb *stcb,
return;
/* verify that the destination addr is in the association */
/* ignore abort for addresses being deleted */
-
+
/* stop any receive timers */
sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, netp);
/* notify user of the abort and clean up... */
@@ -553,7 +553,7 @@ sctp_handle_abort(struct sctp_abort_chunk *cp, struct sctp_tcb *stcb,
if(LIST_FIRST(&stcb->sctp_ep->sctp_asoc_list) == NULL){
/* finish the job now */
sctp_inpcb_free(stcb->sctp_ep,1);
- }
+ }
}
#ifdef SCTP_DEBUG
@@ -565,7 +565,7 @@ sctp_handle_abort(struct sctp_abort_chunk *cp, struct sctp_tcb *stcb,
static void
sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb,
- struct sctp_nets *netp)
+ struct sctp_nets *netp)
{
struct sctp_association *assoc;
int some_on_streamwheel;
@@ -576,7 +576,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb,
#endif
if (stcb == NULL)
return;
-
+
if(ntohs(cp->ch.chunk_length) != sizeof(struct sctp_shutdown_chunk)){
/* update current data status */
#ifdef SCTP_DEBUG
@@ -642,7 +642,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, struct sctp_tcb *stcb,
static void
sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
- struct sctp_tcb *stcb, struct sctp_nets *netp)
+ struct sctp_tcb *stcb, struct sctp_nets *netp)
{
struct sctp_association *assoc;
#ifdef SCTP_DEBUG
@@ -663,7 +663,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
/* notify upper layer protocol */
sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL);
/* are the queues empty? */
- if (!TAILQ_EMPTY(&assoc->send_queue) ||
+ if (!TAILQ_EMPTY(&assoc->send_queue) ||
!TAILQ_EMPTY(&assoc->sent_queue) ||
!TAILQ_EMPTY(&assoc->out_wheel)) {
sctp_report_all_outbound(stcb);
@@ -680,7 +680,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
if(LIST_FIRST(&stcb->sctp_ep->sctp_asoc_list) == NULL){
/* finish the job now */
sctp_inpcb_free(stcb->sctp_ep,1);
- }
+ }
}
}
@@ -695,7 +695,7 @@ sctp_process_unrecog_chunk(struct sctp_tcb *tcb,
* other than that and our peer must be broken.
*/
struct sctp_chunkhdr *chk;
-
+
chk = (struct sctp_chunkhdr *)((caddr_t)phdr + sizeof(*phdr));
switch(chk->chunk_type){
case SCTP_ASCONF_ACK:
@@ -735,7 +735,7 @@ sctp_process_unrecog_param(struct sctp_tcb *tcb,
* OR the u-stream param these will turn of specific features.
*/
struct sctp_paramhdr *pbad;
-
+
pbad = phdr + 1;
switch(ntohs(pbad->param_type)){
/* u-sctp draft */
@@ -893,7 +893,7 @@ sctp_unpack_usctp_streams(struct sctp_tcb *stcb,
int len,augment,at;
int my_len;
-
+
phdr = (struct sctp_paramhdr *)((caddr_t)initack_cp + sizeof(struct sctp_init_chunk));
len = ntohs(initack_cp->ch.chunk_length) - sizeof(struct sctp_init_chunk);
at = sizeof(struct sctp_init_chunk);
@@ -926,7 +926,7 @@ sctp_unpack_usctp_streams(struct sctp_tcb *stcb,
static int
sctp_handle_init_ack(struct mbuf *m, struct sctp_init_ack_chunk *cp,
struct sctp_tcb *stcb, struct sctp_nets *netp,
- int offset, int iphlen)
+ int offset, int iphlen)
{
struct sctp_init_ack *init_ack;
int *state;
@@ -955,25 +955,25 @@ sctp_handle_init_ack(struct mbuf *m, struct sctp_init_ack_chunk *cp,
/* validate parameters */
if (init_ack->initiate_tag == 0) {
/* protocol error... send an abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,op_err);
return(-1);
}
if (ntohl(init_ack->a_rwnd) < SCTP_MIN_RWND) {
/* protocol error... send an abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,op_err);
return(-1);
}
if (init_ack->num_inbound_streams == 0) {
/* protocol error... send an abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,op_err);
return(-1);
}
if (init_ack->num_outbound_streams == 0) {
/* protocol error... send an abort */
- op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
+ op_err = sctp_generate_invmanparam(SCTP_CAUSE_INVALID_PARAM);
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,op_err);
return(-1);
}
@@ -1007,7 +1007,7 @@ sctp_handle_init_ack(struct mbuf *m, struct sctp_init_ack_chunk *cp,
/* reset the RTO calc */
stcb->asoc.overall_error_count = 0;
- SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
+ SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
if (stcb->asoc.peer_supports_usctp) {
sctp_unpack_usctp_streams(stcb,cp,m,offset);
}
@@ -1052,7 +1052,7 @@ sctp_process_cookie_existing(struct mbuf *m, int offset, int iphlen,
struct sctp_nets *netp,
struct sctp_state_cookie *cookie, int length,
int *notification,
- struct sockaddr *to)
+ struct sockaddr *to)
{
struct sctp_association *assoc;
struct sctp_init_chunk *init_cp, tmp_init;
@@ -1075,7 +1075,7 @@ sctp_process_cookie_existing(struct mbuf *m, int offset, int iphlen,
if(sctp_debug_on & SCTP_DEBUG_INPUT2){
printf("sctp_handle_cookie: got a cookie, while shutting down!\n");
}
-#endif
+#endif
MGETHDR(op_err,M_DONTWAIT, MT_HEADER);
if(op_err == NULL)
/* FOOBAR */
@@ -1188,7 +1188,7 @@ sctp_process_cookie_existing(struct mbuf *m, int offset, int iphlen,
/* start the path MTU raise and heartbeat timers */
sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, netp);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, netp);
- if(stcb->asoc.sctp_autoclose_ticks &&
+ if(stcb->asoc.sctp_autoclose_ticks &&
(inp->sctp_flags & SCTP_PCB_FLAGS_AUTOCLOSE)){
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
}
@@ -1252,7 +1252,7 @@ sctp_process_cookie_existing(struct mbuf *m, int offset, int iphlen,
/* start the path MTU raise and heartbeat timers */
sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, netp);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, netp);
- if(stcb->asoc.sctp_autoclose_ticks &&
+ if(stcb->asoc.sctp_autoclose_ticks &&
(inp->sctp_flags & SCTP_PCB_FLAGS_AUTOCLOSE)){
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
}
@@ -1403,7 +1403,7 @@ sctp_process_cookie_new(struct mbuf *m, int offset, int iphlen,
struct sctp_state_cookie *cookie, int length,
struct sockaddr *to,
struct sockaddr *dest,
- int *notification)
+ int *notification)
{
struct sctp_tcb *stcb;
struct sctp_init_chunk *init_cp, tmp_init;
@@ -1575,7 +1575,7 @@ sctp_process_cookie_new(struct mbuf *m, int offset, int iphlen,
return(NULL);
}
/* now do we enable u-sctp? */
- if (stcb->asoc.peer_supports_usctp) {
+ if (stcb->asoc.peer_supports_usctp) {
/* Yes, we must set all the streams that we told him
* about in the INIT-ACK.
*/
@@ -1629,7 +1629,7 @@ sctp_process_cookie_new(struct mbuf *m, int offset, int iphlen,
* do the correct asconf processing.
* else, make sure we have the correct addresses in our lists
*/
- addrlen = offset + length -
+ addrlen = offset + length -
(initack_offset + sizeof(struct sctp_init_ack_chunk));
offset = initack_offset + sizeof(struct sctp_init_ack_chunk);
sctp_check_address_list(stcb, m, offset, addrlen,
@@ -1643,7 +1643,7 @@ sctp_process_cookie_new(struct mbuf *m, int offset, int iphlen,
/* start the path MTU raise and heartbeat timers */
sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, *netp);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, *netp);
- if (stcb->asoc.sctp_autoclose_ticks &&
+ if (stcb->asoc.sctp_autoclose_ticks &&
(inp->sctp_flags & SCTP_PCB_FLAGS_AUTOCLOSE)) {
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
}
@@ -1739,7 +1739,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
cookie = &cookie_cp->cookie;
cookie_offset = offset + sizeof(struct sctp_chunkhdr);
cookie_len = ntohs(cookie_cp->ch.chunk_length);
-
+
/* compute size of packet */
if (m->m_flags & M_PKTHDR) {
size_of_pkt = m->m_pkthdr.len;
@@ -1870,7 +1870,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
}
if (cookie_ok == 0) {
-#ifdef SCTP_DEBUG
+#ifdef SCTP_DEBUG
if(sctp_debug_on & SCTP_DEBUG_INPUT2){
printf("handle_cookie_echo: cookie signature validation failed!\n");
printf("offset = %u, cookie_offset = %u, sig_offset = %u\n",
@@ -1902,7 +1902,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
if(sctp_debug_on & SCTP_DEBUG_INPUT3){
printf("sctp_handle_cookie: got a STALE cookie!\n");
}
-#endif
+#endif
MGETHDR(op_err,M_DONTWAIT, MT_HEADER);
if (op_err == NULL)
/* FOOBAR */
@@ -1928,8 +1928,8 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
cookie->peers_vtag);
return(NULL);
}
- /*
- * Now we must see with the lookup address if we have an existing
+ /*
+ * Now we must see with the lookup address if we have an existing
* asoc. This will only happen if we were in the COOKIE-WAIT state
* and a INIT collided with us and somewhere the peer sent the
* cookie on another address besides the single address our assoc
@@ -1969,9 +1969,9 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
printf("sctp_handle_cookie: processing NEW cookie\n");
}
#endif
- *stcb = sctp_process_cookie_new(m, offset, iphlen,
+ *stcb = sctp_process_cookie_new(m, offset, iphlen,
*inp, netp,
- cookie, cookie_len,
+ cookie, cookie_len,
to, localep_sa,
&notification);
} else {
@@ -2001,7 +2001,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
}
#ifdef SCTP_TCP_MODEL_SUPPORT
if((*inp)->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE){
- if(!had_a_existing_tcb ||
+ if(!had_a_existing_tcb ||
(((*inp)->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
/* If we have a NEW cookie or the connect never reaced
* the connected state during collision we must do the
@@ -2032,9 +2032,9 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
return(NULL);
}
n_inp = (struct sctp_inpcb *)so->so_pcb;
- n_inp->sctp_flags = (SCTP_PCB_FLAGS_TCPTYPE |
- SCTP_PCB_FLAGS_CONNECTED |
- SCTP_PCB_FLAGS_IN_TCPPOOL |
+ n_inp->sctp_flags = (SCTP_PCB_FLAGS_TCPTYPE |
+ SCTP_PCB_FLAGS_CONNECTED |
+ SCTP_PCB_FLAGS_IN_TCPPOOL |
(SCTP_PCB_COPY_FLAGS & (*inp)->sctp_flags) |
SCTP_PCB_FLAGS_DONT_WAKE);
n_inp->sctp_socket = so;
@@ -2059,7 +2059,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int offset, int iphlen,
static void
sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp, struct sctp_tcb *stcb,
- struct sctp_nets *netp)
+ struct sctp_nets *netp)
{
struct sctp_association *assoc;
#ifdef SCTP_DEBUG
@@ -2091,7 +2091,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp, struct sctp_tcb *stcb,
/* update RTO */
if (assoc->overall_error_count == 0){
netp->RTO = sctp_calculate_rto(stcb,assoc, netp,
- &assoc->time_entered);
+ &assoc->time_entered);
}
SCTP_GETTIME_TIMEVAL(&assoc->time_entered);
sctp_ulp_notify(SCTP_NOTIFY_ASSOC_UP, stcb, 0, NULL);
@@ -2100,7 +2100,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp, struct sctp_tcb *stcb,
stcb, netp);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep,
stcb, netp);
- if (stcb->asoc.sctp_autoclose_ticks &&
+ if (stcb->asoc.sctp_autoclose_ticks &&
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_AUTOCLOSE)) {
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE,
stcb->sctp_ep, stcb, NULL);
@@ -2162,7 +2162,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_chunk *ecne,
net->cwnd = net->ssthresh;
tcb->asoc.last_cwr_tsn = ntohl(ecne->tsn);
}
- /*
+ /*
* We always send a CWR this way if our previous one was lost
* our peer will get an update.
*/
@@ -2172,7 +2172,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_chunk *ecne,
static void
sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
- struct sctp_tcb *stcb, struct sctp_nets *netp)
+ struct sctp_tcb *stcb, struct sctp_nets *netp)
{
struct sctp_association *assoc;
#ifdef SCTP_DEBUG
@@ -2192,7 +2192,7 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
/* notify upper layer protocol */
sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL);
/* are the queues empty? */
- if (!TAILQ_EMPTY(&assoc->send_queue) ||
+ if (!TAILQ_EMPTY(&assoc->send_queue) ||
!TAILQ_EMPTY(&assoc->sent_queue) ||
!TAILQ_EMPTY(&assoc->out_wheel)) {
sctp_report_all_outbound(stcb);
@@ -2206,7 +2206,7 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
if(LIST_FIRST(&stcb->sctp_ep->sctp_asoc_list) == NULL){
/* finish the job now */
sctp_inpcb_free(stcb->sctp_ep,1);
- }
+ }
}
return;
}
@@ -2228,7 +2228,7 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
static struct sctp_tcb *
sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
struct sctp_tcb *stcb, struct sctp_nets **netp,
- int iphlen, int *offset, int *length)
+ int iphlen, int *offset, int *length)
{
struct sctphdr *sctphdr;
struct sctp_chunkhdr *ch;
@@ -2237,16 +2237,16 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
int num_chunks = 0; /* number of control chunks processed */
int chk_length, ret;
- /* How big should this be, and should it be alloc'd?
+ /* How big should this be, and should it be alloc'd?
* Lets try the d-mtu-ceiling for now (2k) and that should
- * hopefully work ... until we get into jumbo grams and such..
+ * hopefully work ... until we get into jumbo grams and such..
*/
static u_int8_t chunk_buf[DEFAULT_CHUNK_BUFFER];
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_INPUT1) {
- printf("sctp_process_control: iphlen=%u, offset=%u, length=%u stcb:%x\n",
+ printf("sctp_process_control: iphlen=%u, offset=%u, length=%u stcb:%x\n",
iphlen, *offset, *length, (u_int)stcb);
}
#endif /* SCTP_DEBUG */
@@ -2408,7 +2408,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
if ((ch->chunk_type == SCTP_ABORT_ASSOCIATION) ||
(ch->chunk_type == SCTP_SHUTDOWN_COMPLETE)) {
if ((vtag_in == assoc->my_vtag) ||
- ((ch->chunk_flags & SCTP_HAD_NO_TCB) &&
+ ((ch->chunk_flags & SCTP_HAD_NO_TCB) &&
(vtag_in == assoc->peer_vtag))) {
/* this is valid */
} else {
@@ -2465,7 +2465,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
(*length < chk_length)) {
#ifdef SCTP_DEBUG
if (sctp_debug_on & SCTP_DEBUG_INPUT3) {
- printf("sctp_process_control: length issue *length:%u < chk_length:%u\n", *length,
+ printf("sctp_process_control: length issue *length:%u < chk_length:%u\n", *length,
chk_length);
}
#endif /* SCTP_DEBUG */
@@ -2519,7 +2519,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
*length = 0;
return(NULL);
}
- if ((num_chunks > 1) ||
+ if ((num_chunks > 1) ||
(*length > SCTP_SIZE32(chk_length))) {
*length = 0;
return(NULL);
@@ -2542,7 +2542,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
return(NULL);
}
- if ((num_chunks > 1) ||
+ if ((num_chunks > 1) ||
(*length > SCTP_SIZE32(chk_length))) {
#ifdef SCTP_DEBUG
if(sctp_debug_on & SCTP_DEBUG_INPUT3){
@@ -2555,7 +2555,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
}
ret = sctp_handle_init_ack(m, (struct sctp_init_ack_chunk *)ch, stcb, *netp, *offset, iphlen);
/* Special case, I must call the output routine
- * to get the cookie echoed
+ * to get the cookie echoed
*/
if((stcb) && ret == 0)
sctp_chunk_output(stcb->sctp_ep, stcb, 2);
@@ -2564,7 +2564,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
if(sctp_debug_on & SCTP_DEBUG_INPUT3){
printf("All done INIT-ACK processing\n");
}
-#endif
+#endif
return(NULL);
break;
case SCTP_SELECTIVE_ACK:
@@ -2728,7 +2728,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
}
#endif /* SCTP_DEBUG */
/* must be first and only chunk */
- if ((num_chunks > 1) ||
+ if ((num_chunks > 1) ||
(*length > SCTP_SIZE32(chk_length))) {
*length = 0;
return(NULL);
@@ -2800,7 +2800,7 @@ sctp_process_control(struct mbuf *m, struct sctp_inpcb *inp,
printf("Gak can't copy the chunk into operr %d bytes\n",
chk_length);
}
-#endif
+#endif
}
#ifdef SCTP_DEBUG
}else{
@@ -2856,7 +2856,7 @@ sctp_process_ecn_marked(struct sctp_tcb *stcb,
stcb->asoc.last_echo_tsn = high_tsn;
}
}else if((ecn_bits & SCTP_ECT1_BIT) == SCTP_ECT1_BIT){
- /* we only add to the nonce sum for ECT1, ECT0
+ /* we only add to the nonce sum for ECT1, ECT0
* does not change the NS bit (that we have
* yet to find a way to send it yet).
*/
@@ -2913,7 +2913,7 @@ sctp_common_input_processing(struct sctp_inpcb *inp,
/* out of the blue DATA chunk */
sctp_handle_ootb(inp, m, iphlen, offset, length,
NULL);
-
+
return(1);
}
if (stcb->asoc.my_vtag != ntohl(sh->v_tag)) {
@@ -2943,7 +2943,7 @@ sctp_common_input_processing(struct sctp_inpcb *inp,
/* plow through the data chunks while length > 0 */
if (length > 0) {
int ret_v;
- /*
+ /*
* First check to make sure our state is correct.
* We would not get here unless we really did have a
* tag, so we don't abort if this happens, just
@@ -2967,14 +2967,14 @@ sctp_common_input_processing(struct sctp_inpcb *inp,
case SCTP_STATE_OPEN:
case SCTP_STATE_SHUTDOWN_SENT:
break;
- }
+ }
/* take care of ECN */
/* plow through the data chunks while length > 0 */
- ret_v = sctp_process_data(m, inp, stcb, netp, iphlen, &offset,
+ ret_v = sctp_process_data(m, inp, stcb, netp, iphlen, &offset,
&length, &high_tsn);
/* Anything important needs to have been m_copy'ed in process_data */
if(ret_v == 0){
- if (stcb->asoc.ecn_allowed &&
+ if (stcb->asoc.ecn_allowed &&
(ecn_bits & (SCTP_ECT0_BIT|SCTP_ECT1_BIT))) {
/* The packet is marked for congestion */
sctp_process_ecn_marked(stcb, netp, high_tsn,
@@ -3120,7 +3120,7 @@ sctp_input(m, va_alist)
if (inp == NULL) {
sctp_pegs[SCTP_NOPORTS]++;
#ifdef ICMP_BANDLIM
- /*
+ /*
* we use the bandwidth limiting to protect against
* sending too many ABORTS all at once. In this case
* these count the same as an ICMP message.
@@ -3222,7 +3222,7 @@ sctp_input(m, va_alist)
length = ip->ip_len - (sizeof(struct sctphdr) + (ip->ip_hl << 2));
#endif
offset -= sizeof(struct sctp_chunkhdr);
-
+
ecn_bits = ip->ip_tos;
#if defined(__NetBSD__) || defined(__OpenBSD__)
s = splsoftnet();
View
292 kame/sys/netinet/sctp_output.c
@@ -1,4 +1,4 @@
-/* $KAME: sctp_output.c,v 1.9 2002/06/08 21:42:38 itojun Exp $ */
+/* $KAME: sctp_output.c,v 1.10 2002/06/09 16:29:54 itojun Exp $ */
/* Header: /home/sctpBsd/netinet/sctp_output.c,v 1.308 2002/04/04 18:47:03 randall Exp */
/*
@@ -129,7 +129,7 @@
#endif
#endif /* IPSEC */