summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_indata.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2012-05-04 09:27:00 +0000
committertuexen <tuexen@FreeBSD.org>2012-05-04 09:27:00 +0000
commita91acdb88b679b142c4b6e7519b5e9ff6810d4ae (patch)
tree77e1a7dc4e93d8bbef0274e6b47919b597640604 /sys/netinet/sctp_indata.c
parent3f57d6ecd5469f6795c7306903247ca8bba1a12d (diff)
downloadFreeBSD-src-a91acdb88b679b142c4b6e7519b5e9ff6810d4ae.zip
FreeBSD-src-a91acdb88b679b142c4b6e7519b5e9ff6810d4ae.tar.gz
Use SCTP_PRINTF() instead of printf() in all SCTP sources.
MFC after: 3 days
Diffstat (limited to 'sys/netinet/sctp_indata.c')
-rw-r--r--sys/netinet/sctp_indata.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index d7b9d9c..24b6e1f 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -328,7 +328,7 @@ sctp_mark_non_revokable(struct sctp_association *asoc, uint32_t tsn)
}
SCTP_CALC_TSN_TO_GAP(gap, tsn, asoc->mapping_array_base_tsn);
if (!SCTP_IS_TSN_PRESENT(asoc->mapping_array, gap)) {
- printf("gap:%x tsn:%x\n", gap, tsn);
+ SCTP_PRINTF("gap:%x tsn:%x\n", gap, tsn);
sctp_print_mapping_array(asoc);
#ifdef INVARIANTS
panic("Things are really messed up now!!");
@@ -2308,7 +2308,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
#ifdef INVARIANTS
for (i = 0; i < asoc->mapping_array_size; i++) {
if ((asoc->mapping_array[i]) || (asoc->nr_mapping_array[i])) {
- printf("Error Mapping array's not clean at clear\n");
+ SCTP_PRINTF("Error Mapping array's not clean at clear\n");
sctp_print_mapping_array(asoc);
}
}
@@ -2330,7 +2330,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
#ifdef INVARIANTS
panic("impossible slide");
#else
- printf("impossible slide lgap:%x slide_end:%x slide_from:%x? at:%d\n",
+ SCTP_PRINTF("impossible slide lgap:%x slide_end:%x slide_from:%x? at:%d\n",
lgap, slide_end, slide_from, at);
return;
#endif
@@ -2339,7 +2339,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
#ifdef INVARIANTS
panic("would overrun buffer");
#else
- printf("Gak, would have overrun map end:%d slide_end:%d\n",
+ SCTP_PRINTF("Gak, would have overrun map end:%d slide_end:%d\n",
asoc->mapping_array_size, slide_end);
slide_end = asoc->mapping_array_size;
#endif
@@ -3489,7 +3489,10 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
continue;
}
}
- /* printf("OK, we are now ready to FR this guy\n"); */
+ /*
+ * SCTP_PRINTF("OK, we are now ready to FR this
+ * guy\n");
+ */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) {
sctp_log_fr(tp1->rec.data.TSN_seq, tp1->snd_count,
0, SCTP_FR_MARKED);
@@ -3557,7 +3560,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
tot_retrans++;
/* mark the sending seq for possible subsequent FR's */
/*
- * printf("Marking TSN for FR new value %x\n",
+ * SCTP_PRINTF("Marking TSN for FR new value %x\n",
* (uint32_t)tpi->rec.data.TSN_seq);
*/
if (TAILQ_EMPTY(&asoc->send_queue)) {
@@ -3709,11 +3712,10 @@ sctp_fs_audit(struct sctp_association *asoc)
TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) {
if (chk->sent < SCTP_DATAGRAM_RESEND) {
- printf("Chk TSN:%u size:%d inflight cnt:%d\n",
+ SCTP_PRINTF("Chk TSN:%u size:%d inflight cnt:%d\n",
chk->rec.data.TSN_seq,
chk->send_size,
- chk->snd_count
- );
+ chk->snd_count);
inflight++;
} else if (chk->sent == SCTP_DATAGRAM_RESEND) {
resend++;
@@ -3730,7 +3732,7 @@ sctp_fs_audit(struct sctp_association *asoc)
#ifdef INVARIANTS
panic("Flight size-express incorrect? \n");
#else
- printf("asoc->total_flight:%d cnt:%d\n",
+ SCTP_PRINTF("asoc->total_flight:%d cnt:%d\n",
entry_flight, entry_cnt);
SCTP_PRINTF("Flight size-express incorrect F:%d I:%d R:%d Ab:%d ACK:%d\n",
@@ -3895,7 +3897,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
TAILQ_FOREACH_SAFE(tp1, &asoc->sent_queue, sctp_next, tp2) {
if (SCTP_TSN_GE(cumack, tp1->rec.data.TSN_seq)) {
if (tp1->sent == SCTP_DATAGRAM_UNSENT) {
- printf("Warning, an unsent is now acked?\n");
+ SCTP_PRINTF("Warning, an unsent is now acked?\n");
}
if (tp1->sent < SCTP_DATAGRAM_ACKED) {
/*
@@ -4437,10 +4439,10 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
* no way, we have not even sent this TSN out yet.
* Peer is hopelessly messed up with us.
*/
- printf("NEW cum_ack:%x send_s:%x is smaller or equal\n",
+ SCTP_PRINTF("NEW cum_ack:%x send_s:%x is smaller or equal\n",
cum_ack, send_s);
if (tp1) {
- printf("Got send_s from tsn:%x + 1 of tp1:%p\n",
+ SCTP_PRINTF("Got send_s from tsn:%x + 1 of tp1:%p\n",
tp1->rec.data.TSN_seq, tp1);
}
hopeless_peer:
@@ -4681,10 +4683,8 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
* peer is either confused or we are under
* attack. We must abort.
*/
- printf("Hopeless peer! biggest_tsn_acked:%x largest seq:%x\n",
- biggest_tsn_acked,
- send_s);
-
+ SCTP_PRINTF("Hopeless peer! biggest_tsn_acked:%x largest seq:%x\n",
+ biggest_tsn_acked, send_s);
goto hopeless_peer;
}
}
@@ -4719,7 +4719,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
}
if (tp1->sent == SCTP_DATAGRAM_UNSENT) {
/* no more sent on list */
- printf("Warning, tp1->sent == %d and its now acked?\n",
+ SCTP_PRINTF("Warning, tp1->sent == %d and its now acked?\n",
tp1->sent);
}
TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next);
OpenPOWER on IntegriCloud