summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2012-09-22 14:39:20 +0000
committertuexen <tuexen@FreeBSD.org>2012-09-22 14:39:20 +0000
commit392169f5f059fb0f825f04f9d8637ffdee6fb4bd (patch)
treee363087ad6b10fee1816295e7816eb1656f4634f /sys/netinet
parentc0470c839d9d3cd64ee4c9f0e5b94901716cf5de (diff)
downloadFreeBSD-src-392169f5f059fb0f825f04f9d8637ffdee6fb4bd.zip
FreeBSD-src-392169f5f059fb0f825f04f9d8637ffdee6fb4bd.tar.gz
Small cleanups. No functional change.
MFC after: 10 days
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c39
-rw-r--r--sys/netinet/sctp_output.h32
2 files changed, 18 insertions, 53 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index da21082..4ef8705 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -11394,11 +11394,11 @@ sctp_send_cwr(struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t high_tsn, u
struct sctp_cwr_chunk *cwr;
struct sctp_tmit_chunk *chk;
- asoc = &stcb->asoc;
SCTP_TCB_LOCK_ASSERT(stcb);
if (net == NULL) {
return;
}
+ asoc = &stcb->asoc;
TAILQ_FOREACH(chk, &asoc->control_send_queue, sctp_next) {
if ((chk->rec.chunk_id.id == SCTP_ECN_CWR) && (net == chk->whoTo)) {
/*
@@ -11453,13 +11453,11 @@ sctp_add_stream_reset_out(struct sctp_tmit_chunk *chk,
int number_entries, uint16_t * list,
uint32_t seq, uint32_t resp_seq, uint32_t last_sent)
{
- int len, old_len, i;
+ uint16_t len, old_len, i;
struct sctp_stream_reset_out_request *req_out;
struct sctp_chunkhdr *ch;
ch = mtod(chk->data, struct sctp_chunkhdr *);
-
-
old_len = len = SCTP_SIZE32(ntohs(ch->chunk_length));
/* get to new offset for the param. */
@@ -11493,19 +11491,16 @@ sctp_add_stream_reset_out(struct sctp_tmit_chunk *chk,
return;
}
-
-void
+static void
sctp_add_stream_reset_in(struct sctp_tmit_chunk *chk,
int number_entries, uint16_t * list,
uint32_t seq)
{
- int len, old_len, i;
+ uint16_t len, old_len, i;
struct sctp_stream_reset_in_request *req_in;
struct sctp_chunkhdr *ch;
ch = mtod(chk->data, struct sctp_chunkhdr *);
-
-
old_len = len = SCTP_SIZE32(ntohs(ch->chunk_length));
/* get to new offset for the param. */
@@ -11537,18 +11532,15 @@ sctp_add_stream_reset_in(struct sctp_tmit_chunk *chk,
return;
}
-
-void
+static void
sctp_add_stream_reset_tsn(struct sctp_tmit_chunk *chk,
uint32_t seq)
{
- int len, old_len;
+ uint16_t len, old_len;
struct sctp_stream_reset_tsn_request *req_tsn;
struct sctp_chunkhdr *ch;
ch = mtod(chk->data, struct sctp_chunkhdr *);
-
-
old_len = len = SCTP_SIZE32(ntohs(ch->chunk_length));
/* get to new offset for the param. */
@@ -11572,13 +11564,11 @@ void
sctp_add_stream_reset_result(struct sctp_tmit_chunk *chk,
uint32_t resp_seq, uint32_t result)
{
- int len, old_len;
+ uint16_t len, old_len;
struct sctp_stream_reset_response *resp;
struct sctp_chunkhdr *ch;
ch = mtod(chk->data, struct sctp_chunkhdr *);
-
-
old_len = len = SCTP_SIZE32(ntohs(ch->chunk_length));
/* get to new offset for the param. */
@@ -11597,22 +11587,18 @@ sctp_add_stream_reset_result(struct sctp_tmit_chunk *chk,
chk->send_size = SCTP_SIZE32(chk->book_size);
SCTP_BUF_LEN(chk->data) = chk->send_size;
return;
-
}
-
void
sctp_add_stream_reset_result_tsn(struct sctp_tmit_chunk *chk,
uint32_t resp_seq, uint32_t result,
uint32_t send_una, uint32_t recv_next)
{
- int len, old_len;
+ uint16_t len, old_len;
struct sctp_stream_reset_response_tsn *resp;
struct sctp_chunkhdr *ch;
ch = mtod(chk->data, struct sctp_chunkhdr *);
-
-
old_len = len = SCTP_SIZE32(ntohs(ch->chunk_length));
/* get to new offset for the param. */
@@ -11640,7 +11626,7 @@ sctp_add_an_out_stream(struct sctp_tmit_chunk *chk,
uint32_t seq,
uint16_t adding)
{
- int len, old_len;
+ uint16_t len, old_len;
struct sctp_chunkhdr *ch;
struct sctp_stream_reset_add_strm *addstr;
@@ -11673,7 +11659,7 @@ sctp_add_an_in_stream(struct sctp_tmit_chunk *chk,
uint32_t seq,
uint16_t adding)
{
- int len, old_len;
+ uint16_t len, old_len;
struct sctp_chunkhdr *ch;
struct sctp_stream_reset_add_strm *addstr;
@@ -11700,8 +11686,6 @@ sctp_add_an_in_stream(struct sctp_tmit_chunk *chk,
return;
}
-
-
int
sctp_send_str_reset_req(struct sctp_tcb *stcb,
int number_entries, uint16_t * list,
@@ -11710,8 +11694,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
uint8_t send_tsn_req,
uint8_t add_stream,
uint16_t adding_o,
- uint16_t adding_i, uint8_t peer_asked
-)
+ uint16_t adding_i, uint8_t peer_asked)
{
struct sctp_association *asoc;
diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h
index b91d476..91eb35d 100644
--- a/sys/netinet/sctp_output.h
+++ b/sys/netinet/sctp_output.h
@@ -173,37 +173,19 @@ void sctp_send_cwr(struct sctp_tcb *, struct sctp_nets *, uint32_t, uint8_t);
void
-sctp_add_stream_reset_out(struct sctp_tmit_chunk *chk,
- int number_entries, uint16_t * list,
- uint32_t seq, uint32_t resp_seq, uint32_t last_sent);
+sctp_add_stream_reset_out(struct sctp_tmit_chunk *,
+ int, uint16_t *, uint32_t, uint32_t, uint32_t);
void
-sctp_add_stream_reset_in(struct sctp_tmit_chunk *chk,
- int number_entries, uint16_t * list,
- uint32_t seq);
+ sctp_add_stream_reset_result(struct sctp_tmit_chunk *, uint32_t, uint32_t);
void
-sctp_add_stream_reset_tsn(struct sctp_tmit_chunk *chk,
- uint32_t seq);
-
-void
-sctp_add_stream_reset_result(struct sctp_tmit_chunk *chk,
- uint32_t resp_seq, uint32_t result);
-
-void
-sctp_add_stream_reset_result_tsn(struct sctp_tmit_chunk *chk,
- uint32_t resp_seq, uint32_t result,
- uint32_t send_una, uint32_t recv_next);
+sctp_add_stream_reset_result_tsn(struct sctp_tmit_chunk *,
+ uint32_t, uint32_t, uint32_t, uint32_t);
int
-sctp_send_str_reset_req(struct sctp_tcb *stcb,
- int number_entries, uint16_t * list,
- uint8_t send_out_req,
- uint8_t send_in_req,
- uint8_t send_tsn_req,
- uint8_t add_stream,
- uint16_t adding_o,
- uint16_t adding_i, uint8_t from_peer);
+sctp_send_str_reset_req(struct sctp_tcb *, int, uint16_t *, uint8_t, uint8_t,
+ uint8_t, uint8_t, uint16_t, uint16_t, uint8_t);
void
sctp_send_abort(struct mbuf *, int, struct sockaddr *, struct sockaddr *,
OpenPOWER on IntegriCloud