12529f56eSJonathan T. Looney /*-
24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause
32529f56eSJonathan T. Looney *
469c7c811SRandall Stewart * Copyright (c) 2016-2020 Netflix, Inc.
52529f56eSJonathan T. Looney *
62529f56eSJonathan T. Looney * Redistribution and use in source and binary forms, with or without
72529f56eSJonathan T. Looney * modification, are permitted provided that the following conditions
82529f56eSJonathan T. Looney * are met:
92529f56eSJonathan T. Looney * 1. Redistributions of source code must retain the above copyright
102529f56eSJonathan T. Looney * notice, this list of conditions and the following disclaimer.
112529f56eSJonathan T. Looney * 2. Redistributions in binary form must reproduce the above copyright
122529f56eSJonathan T. Looney * notice, this list of conditions and the following disclaimer in the
132529f56eSJonathan T. Looney * documentation and/or other materials provided with the distribution.
142529f56eSJonathan T. Looney *
152529f56eSJonathan T. Looney * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
162529f56eSJonathan T. Looney * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
172529f56eSJonathan T. Looney * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
182529f56eSJonathan T. Looney * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
192529f56eSJonathan T. Looney * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
202529f56eSJonathan T. Looney * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
212529f56eSJonathan T. Looney * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
222529f56eSJonathan T. Looney * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
232529f56eSJonathan T. Looney * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
242529f56eSJonathan T. Looney * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
252529f56eSJonathan T. Looney * SUCH DAMAGE.
262529f56eSJonathan T. Looney */
272529f56eSJonathan T. Looney
282529f56eSJonathan T. Looney #ifndef __tcp_log_buf_h__
292529f56eSJonathan T. Looney #define __tcp_log_buf_h__
302529f56eSJonathan T. Looney
312529f56eSJonathan T. Looney #define TCP_LOG_REASON_LEN 32
32a9a08eceSRandall Stewart #define TCP_LOG_TAG_LEN 32
33e854dd38SRandall Stewart #define TCP_LOG_BUF_VER (9)
342529f56eSJonathan T. Looney
352529f56eSJonathan T. Looney /*
362529f56eSJonathan T. Looney * Because the (struct tcp_log_buffer) includes 8-byte uint64_t's, it requires
372529f56eSJonathan T. Looney * 8-byte alignment to work properly on all platforms. Therefore, we will
382529f56eSJonathan T. Looney * enforce 8-byte alignment for all the structures that may appear by
392529f56eSJonathan T. Looney * themselves (instead of being embedded in another structure) in a data
402529f56eSJonathan T. Looney * stream.
412529f56eSJonathan T. Looney */
422529f56eSJonathan T. Looney #define ALIGN_TCP_LOG __aligned(8)
432529f56eSJonathan T. Looney
442529f56eSJonathan T. Looney /* Information about the socketbuffer state. */
452529f56eSJonathan T. Looney struct tcp_log_sockbuf
462529f56eSJonathan T. Looney {
472529f56eSJonathan T. Looney uint32_t tls_sb_acc; /* available chars (sb->sb_acc) */
482529f56eSJonathan T. Looney uint32_t tls_sb_ccc; /* claimed chars (sb->sb_ccc) */
492529f56eSJonathan T. Looney uint32_t tls_sb_spare; /* spare */
502529f56eSJonathan T. Looney };
512529f56eSJonathan T. Looney
522529f56eSJonathan T. Looney /* Optional, verbose information that may be appended to an event log. */
532529f56eSJonathan T. Looney struct tcp_log_verbose
542529f56eSJonathan T. Looney {
552529f56eSJonathan T. Looney #define TCP_FUNC_LEN 32
562529f56eSJonathan T. Looney char tlv_snd_frm[TCP_FUNC_LEN]; /* tcp_output() caller */
572529f56eSJonathan T. Looney char tlv_trace_func[TCP_FUNC_LEN]; /* Function that
582529f56eSJonathan T. Looney generated trace */
592529f56eSJonathan T. Looney uint32_t tlv_trace_line; /* Line number that generated trace */
602529f56eSJonathan T. Looney uint8_t _pad[4];
612529f56eSJonathan T. Looney } ALIGN_TCP_LOG;
622529f56eSJonathan T. Looney
632529f56eSJonathan T. Looney struct tcp_log_bbr {
642529f56eSJonathan T. Looney uint64_t cur_del_rate;
652529f56eSJonathan T. Looney uint64_t delRate;
662529f56eSJonathan T. Looney uint64_t rttProp;
672529f56eSJonathan T. Looney uint64_t bw_inuse;
682529f56eSJonathan T. Looney uint32_t inflight;
692529f56eSJonathan T. Looney uint32_t applimited;
702529f56eSJonathan T. Looney uint32_t delivered;
712529f56eSJonathan T. Looney uint32_t timeStamp;
722529f56eSJonathan T. Looney uint32_t epoch;
732529f56eSJonathan T. Looney uint32_t lt_epoch;
742529f56eSJonathan T. Looney uint32_t pkts_out;
752529f56eSJonathan T. Looney uint32_t flex1;
762529f56eSJonathan T. Looney uint32_t flex2;
772529f56eSJonathan T. Looney uint32_t flex3;
782529f56eSJonathan T. Looney uint32_t flex4;
792529f56eSJonathan T. Looney uint32_t flex5;
802529f56eSJonathan T. Looney uint32_t flex6;
812529f56eSJonathan T. Looney uint32_t lost;
822529f56eSJonathan T. Looney uint16_t pacing_gain;
832529f56eSJonathan T. Looney uint16_t cwnd_gain;
842529f56eSJonathan T. Looney uint16_t flex7;
852529f56eSJonathan T. Looney uint8_t bbr_state;
862529f56eSJonathan T. Looney uint8_t bbr_substate;
8789e560f4SRandall Stewart uint8_t inhpts;
88a370832bSGleb Smirnoff uint8_t __spare;
892529f56eSJonathan T. Looney uint8_t use_lt_bw;
902529f56eSJonathan T. Looney uint8_t flex8;
912529f56eSJonathan T. Looney uint32_t pkt_epoch;
922529f56eSJonathan T. Looney };
932529f56eSJonathan T. Looney
9469c7c811SRandall Stewart /* shadows tcp_log_bbr struct element sizes */
9569c7c811SRandall Stewart struct tcp_log_raw {
9669c7c811SRandall Stewart uint64_t u64_flex[4];
9769c7c811SRandall Stewart uint32_t u32_flex[14];
9869c7c811SRandall Stewart uint16_t u16_flex[3];
9969c7c811SRandall Stewart uint8_t u8_flex[6];
10069c7c811SRandall Stewart uint32_t u32_flex2[1];
10169c7c811SRandall Stewart };
10269c7c811SRandall Stewart
10369c7c811SRandall Stewart struct tcp_log_uint64 {
10469c7c811SRandall Stewart uint64_t u64_flex[13];
10569c7c811SRandall Stewart };
10669c7c811SRandall Stewart
10769c7c811SRandall Stewart struct tcp_log_sendfile {
10869c7c811SRandall Stewart uint64_t offset;
10969c7c811SRandall Stewart uint64_t length;
11069c7c811SRandall Stewart uint32_t flags;
11169c7c811SRandall Stewart };
11269c7c811SRandall Stewart
11369c7c811SRandall Stewart /*
11469c7c811SRandall Stewart * tcp_log_stackspecific is currently being used as "event specific" log
11569c7c811SRandall Stewart * info by all stacks (i.e. struct tcp_log_bbr is used for generic event
11669c7c811SRandall Stewart * logging). Until this is cleaned up more generically and throughout,
11769c7c811SRandall Stewart * allow events to use the same space in the union.
11869c7c811SRandall Stewart */
1192529f56eSJonathan T. Looney union tcp_log_stackspecific
1202529f56eSJonathan T. Looney {
1212529f56eSJonathan T. Looney struct tcp_log_bbr u_bbr;
12269c7c811SRandall Stewart struct tcp_log_sendfile u_sf;
12369c7c811SRandall Stewart struct tcp_log_raw u_raw; /* "raw" log access */
12469c7c811SRandall Stewart struct tcp_log_uint64 u64_raw; /* just u64's - used by process info */
1252529f56eSJonathan T. Looney };
1262529f56eSJonathan T. Looney
12769c7c811SRandall Stewart typedef union tcp_log_stackspecific tcp_log_eventspecific_t;
12869c7c811SRandall Stewart
1292529f56eSJonathan T. Looney struct tcp_log_buffer
1302529f56eSJonathan T. Looney {
1312529f56eSJonathan T. Looney /* Event basics */
1322529f56eSJonathan T. Looney struct timeval tlb_tv; /* Timestamp of trace */
1332529f56eSJonathan T. Looney uint32_t tlb_ticks; /* Timestamp of trace */
1342529f56eSJonathan T. Looney uint32_t tlb_sn; /* Serial number */
1352529f56eSJonathan T. Looney uint8_t tlb_stackid; /* Stack ID */
1362529f56eSJonathan T. Looney uint8_t tlb_eventid; /* Event ID */
1372529f56eSJonathan T. Looney uint16_t tlb_eventflags; /* Flags for the record */
1382529f56eSJonathan T. Looney #define TLB_FLAG_RXBUF 0x0001 /* Includes receive buffer info */
1392529f56eSJonathan T. Looney #define TLB_FLAG_TXBUF 0x0002 /* Includes send buffer info */
1402529f56eSJonathan T. Looney #define TLB_FLAG_HDR 0x0004 /* Includes a TCP header */
1412529f56eSJonathan T. Looney #define TLB_FLAG_VERBOSE 0x0008 /* Includes function/line numbers */
1422529f56eSJonathan T. Looney #define TLB_FLAG_STACKINFO 0x0010 /* Includes stack-specific info */
1432529f56eSJonathan T. Looney int tlb_errno; /* Event error (if any) */
1442529f56eSJonathan T. Looney
1452529f56eSJonathan T. Looney /* Internal session state */
1462529f56eSJonathan T. Looney struct tcp_log_sockbuf tlb_rxbuf; /* Receive buffer */
1472529f56eSJonathan T. Looney struct tcp_log_sockbuf tlb_txbuf; /* Send buffer */
1482529f56eSJonathan T. Looney
1492529f56eSJonathan T. Looney int tlb_state; /* TCPCB t_state */
1502529f56eSJonathan T. Looney uint32_t tlb_starttime; /* TCPCB t_starttime */
1512529f56eSJonathan T. Looney uint32_t tlb_iss; /* TCPCB iss */
1522529f56eSJonathan T. Looney uint32_t tlb_flags; /* TCPCB flags */
1532529f56eSJonathan T. Looney uint32_t tlb_snd_una; /* TCPCB snd_una */
1542529f56eSJonathan T. Looney uint32_t tlb_snd_max; /* TCPCB snd_max */
1552529f56eSJonathan T. Looney uint32_t tlb_snd_cwnd; /* TCPCB snd_cwnd */
1562529f56eSJonathan T. Looney uint32_t tlb_snd_nxt; /* TCPCB snd_nxt */
1572529f56eSJonathan T. Looney uint32_t tlb_snd_recover;/* TCPCB snd_recover */
1582529f56eSJonathan T. Looney uint32_t tlb_snd_wnd; /* TCPCB snd_wnd */
1592529f56eSJonathan T. Looney uint32_t tlb_snd_ssthresh; /* TCPCB snd_ssthresh */
1602529f56eSJonathan T. Looney uint32_t tlb_srtt; /* TCPCB t_srtt */
1612529f56eSJonathan T. Looney uint32_t tlb_rttvar; /* TCPCB t_rttvar */
1622529f56eSJonathan T. Looney uint32_t tlb_rcv_up; /* TCPCB rcv_up */
1632529f56eSJonathan T. Looney uint32_t tlb_rcv_adv; /* TCPCB rcv_adv */
164e854dd38SRandall Stewart uint32_t tlb_flags2; /* TCPCB t_flags2 */
1652529f56eSJonathan T. Looney uint32_t tlb_rcv_nxt; /* TCPCB rcv_nxt */
1662529f56eSJonathan T. Looney uint32_t tlb_rcv_wnd; /* TCPCB rcv_wnd */
1672529f56eSJonathan T. Looney uint32_t tlb_dupacks; /* TCPCB t_dupacks */
1682529f56eSJonathan T. Looney int tlb_segqlen; /* TCPCB segqlen */
1692529f56eSJonathan T. Looney int tlb_snd_numholes; /* TCPCB snd_numholes */
1702529f56eSJonathan T. Looney uint32_t tlb_flex1; /* Event specific information */
1712529f56eSJonathan T. Looney uint32_t tlb_flex2; /* Event specific information */
172e854dd38SRandall Stewart uint32_t tlb_fbyte_in; /* TCPCB first byte in time */
173e854dd38SRandall Stewart uint32_t tlb_fbyte_out; /* TCPCB first byte out time */
1742529f56eSJonathan T. Looney uint8_t tlb_snd_scale:4, /* TCPCB snd_scale */
1752529f56eSJonathan T. Looney tlb_rcv_scale:4; /* TCPCB rcv_scale */
1762529f56eSJonathan T. Looney uint8_t _pad[3]; /* Padding */
1772529f56eSJonathan T. Looney /* Per-stack info */
1782529f56eSJonathan T. Looney union tcp_log_stackspecific tlb_stackinfo;
1792529f56eSJonathan T. Looney
1802529f56eSJonathan T. Looney /* The packet */
1812529f56eSJonathan T. Looney uint32_t tlb_len; /* The packet's data length */
1822529f56eSJonathan T. Looney struct tcphdr tlb_th; /* The TCP header */
1832529f56eSJonathan T. Looney uint8_t tlb_opts[TCP_MAXOLEN]; /* The TCP options */
1842529f56eSJonathan T. Looney
1852529f56eSJonathan T. Looney /* Verbose information (optional) */
1862529f56eSJonathan T. Looney struct tcp_log_verbose tlb_verbose[0];
1872529f56eSJonathan T. Looney } ALIGN_TCP_LOG;
1882529f56eSJonathan T. Looney
1892529f56eSJonathan T. Looney enum tcp_log_events {
1902529f56eSJonathan T. Looney TCP_LOG_IN = 1, /* Incoming packet 1 */
1912529f56eSJonathan T. Looney TCP_LOG_OUT, /* Transmit (without other event) 2 */
1922529f56eSJonathan T. Looney TCP_LOG_RTO, /* Retransmit timeout 3 */
1935d8fd932SRandall Stewart TCP_LOG_SB_WAKE, /* Awaken socket buffer 4 */
194*872164f5SRandall Stewart TCP_UNUSED_5, /* Detected bad retransmission 5 */
1952529f56eSJonathan T. Looney TCP_LOG_PRR, /* Doing PRR 6 */
196*872164f5SRandall Stewart TCP_UNUSED_7, /* Detected reorder 7 */
1973b0b41e6SRandall Stewart TCP_LOG_HPTS, /* Hpts sending a packet 8 */
1982529f56eSJonathan T. Looney BBR_LOG_BBRUPD, /* We updated BBR info 9 */
1992529f56eSJonathan T. Looney BBR_LOG_BBRSND, /* We did a slot calculation and sending is done 10 */
2002529f56eSJonathan T. Looney BBR_LOG_ACKCLEAR, /* A ack clears all outstanding 11 */
201*872164f5SRandall Stewart TCP_UNUSED_12, /* The tcb had a packet input to it 12 */
2022529f56eSJonathan T. Looney BBR_LOG_TIMERSTAR, /* Start a timer 13 */
2032529f56eSJonathan T. Looney BBR_LOG_TIMERCANC, /* Cancel a timer 14 */
2042529f56eSJonathan T. Looney BBR_LOG_ENTREC, /* Entered recovery 15 */
2052529f56eSJonathan T. Looney BBR_LOG_EXITREC, /* Exited recovery 16 */
2062529f56eSJonathan T. Looney BBR_LOG_CWND, /* Cwnd change 17 */
2072529f56eSJonathan T. Looney BBR_LOG_BWSAMP, /* LT B/W sample has been made 18 */
2082529f56eSJonathan T. Looney BBR_LOG_MSGSIZE, /* We received a EMSGSIZE error 19 */
2092529f56eSJonathan T. Looney BBR_LOG_BBRRTT, /* BBR RTT is updated 20 */
2102529f56eSJonathan T. Looney BBR_LOG_JUSTRET, /* We just returned out of output 21 */
2115666643aSGordon Bergling BBR_LOG_STATE, /* A BBR state change occurred 22 */
2125666643aSGordon Bergling BBR_LOG_PKT_EPOCH, /* A BBR packet epoch occurred 23 */
2132529f56eSJonathan T. Looney BBR_LOG_PERSIST, /* BBR changed to/from a persists 24 */
2142529f56eSJonathan T. Looney TCP_LOG_FLOWEND, /* End of a flow 25 */
2152529f56eSJonathan T. Looney BBR_LOG_RTO, /* BBR's timeout includes BBR info 26 */
2163b0b41e6SRandall Stewart BBR_LOG_DOSEG_DONE, /* hpts do_segment completes 27 */
2173b0b41e6SRandall Stewart BBR_LOG_EXIT_GAIN, /* hpts do_segment completes 28 */
2182529f56eSJonathan T. Looney BBR_LOG_THRESH_CALC, /* Doing threshold calculation 29 */
2195d8fd932SRandall Stewart TCP_LOG_MAPCHG, /* Map Changes to the sendmap 30 */
2202529f56eSJonathan T. Looney TCP_LOG_USERSEND, /* User level sends data 31 */
2213b0b41e6SRandall Stewart BBR_RSM_CLEARED, /* RSM cleared of ACK flags 32 */
2223b0b41e6SRandall Stewart BBR_LOG_STATE_TARGET, /* Log of target at state 33 */
2235666643aSGordon Bergling BBR_LOG_TIME_EPOCH, /* A timed based Epoch occurred 34 */
2242529f56eSJonathan T. Looney BBR_LOG_TO_PROCESS, /* A to was processed 35 */
2252529f56eSJonathan T. Looney BBR_LOG_BBRTSO, /* TSO update 36 */
2263b0b41e6SRandall Stewart BBR_LOG_HPTSDIAG, /* Hpts diag insert 37 */
2272529f56eSJonathan T. Looney BBR_LOG_LOWGAIN, /* Low gain accounting 38 */
2282529f56eSJonathan T. Looney BBR_LOG_PROGRESS, /* Progress timer event 39 */
2292529f56eSJonathan T. Looney TCP_LOG_SOCKET_OPT, /* A socket option is set 40 */
2302529f56eSJonathan T. Looney BBR_LOG_TIMERPREP, /* A BBR var to debug out TLP issues 41 */
2312529f56eSJonathan T. Looney BBR_LOG_ENOBUF_JMP, /* We had a enobuf jump 42 */
2323b0b41e6SRandall Stewart BBR_LOG_HPTSI_CALC, /* calc the hptsi time 43 */
2332529f56eSJonathan T. Looney BBR_LOG_RTT_SHRINKS, /* We had a log reduction of rttProp 44 */
2342529f56eSJonathan T. Looney BBR_LOG_BW_RED_EV, /* B/W reduction events 45 */
2352529f56eSJonathan T. Looney BBR_LOG_REDUCE, /* old bbr log reduce for 4.1 and earlier 46*/
2362529f56eSJonathan T. Looney TCP_LOG_RTT, /* A rtt (in useconds) is being sampled and applied to the srtt algo 47 */
2372529f56eSJonathan T. Looney BBR_LOG_SETTINGS_CHG, /* Settings changed for loss response 48 */
238*872164f5SRandall Stewart TCP_UNUSED_49, /* SRTT gaining -- now not used 49 */
239c28440dbSRandall Stewart TCP_LOG_REASS, /* Reassembly buffer logging 50 */
2401a714ff2SRandall Stewart TCP_HDWR_PACE_SIZE, /* TCP pacing size set (rl and rack uses this) 51 */
2413b0b41e6SRandall Stewart BBR_LOG_HDWR_PACE, /* TCP Hardware pacing log 52 */
2423b0b41e6SRandall Stewart BBR_LOG_TSTMP_VAL, /* Temp debug timestamp validation 53 */
2433b0b41e6SRandall Stewart TCP_LOG_CONNEND, /* End of connection 54 */
2443b0b41e6SRandall Stewart TCP_LOG_LRO, /* LRO entry 55 */
2453b0b41e6SRandall Stewart TCP_SACK_FILTER_RES, /* Results of SACK Filter 56 */
246*872164f5SRandall Stewart TCP_UNUSED_57, /* Sack Attack Detection 57 */
247e570d231SRandall Stewart TCP_TIMELY_WORK, /* Logs regarding Timely CC tweaks 58 */
248*872164f5SRandall Stewart TCP_UNUSED_59, /* User space event data 59 */
249e570d231SRandall Stewart TCP_LOG_SENDFILE, /* sendfile() logging for TCP connections 60 */
25057a3a161SRandall Stewart TCP_LOG_REQ_T, /* logging of request tracking 61 */
2515d8fd932SRandall Stewart TCP_LOG_ACCOUNTING, /* Log of TCP Accounting data 62 */
2525d8fd932SRandall Stewart TCP_LOG_FSB, /* FSB information 63 */
2535baf32c9SRandall Stewart RACK_DSACK_HANDLING, /* Handling of DSACK in rack for reordering window 64 */
2544e4c84f8SRandall Stewart TCP_HYSTART, /* TCP Hystart logging 65 */
25562ce18fcSRandall Stewart TCP_CHG_QUERY, /* Change query during fnc_init() 66 */
25662ce18fcSRandall Stewart TCP_RACK_LOG_COLLAPSE, /* Window collapse by peer 67 */
257b16a37edSMichael Tuexen TCP_RACK_TP_TRIGGERED, /* A rack tracepoint is triggered 68 */
258b16a37edSMichael Tuexen TCP_HYBRID_PACING_LOG, /* Hybrid pacing log 69 */
25900812bbdSMichael Tuexen TCP_LOG_PRU, /* TCP protocol user request 70 */
260*872164f5SRandall Stewart TCP_UNUSED_71, /* old TCP Policer detectionn, not used 71 */
261e18b97bdSRandall Stewart TCP_PCM_MEASURE, /* TCP Path Capacity Measurement 72 */
26269dace89SPeter Lei TCP_LOG_END /* End (keep at end) 73 */
2632529f56eSJonathan T. Looney };
2642529f56eSJonathan T. Looney
2652529f56eSJonathan T. Looney enum tcp_log_states {
26669c7c811SRandall Stewart TCP_LOG_STATE_RATIO_OFF = -2, /* Log ratio evaluation yielded an OFF
26769c7c811SRandall Stewart result. Only used for tlb_logstate */
26869c7c811SRandall Stewart TCP_LOG_STATE_CLEAR = -1, /* Deactivate and clear tracing. Passed
26969c7c811SRandall Stewart to tcp_log_state_change() but never
27069c7c811SRandall Stewart stored in any logstate variable */
2712529f56eSJonathan T. Looney TCP_LOG_STATE_OFF = 0, /* Pause */
27269c7c811SRandall Stewart
27369c7c811SRandall Stewart /* Positively numbered states represent active logging modes */
2742529f56eSJonathan T. Looney TCP_LOG_STATE_TAIL=1, /* Keep the trailing events */
2752529f56eSJonathan T. Looney TCP_LOG_STATE_HEAD=2, /* Keep the leading events */
2762529f56eSJonathan T. Looney TCP_LOG_STATE_HEAD_AUTO=3, /* Keep the leading events, and
2772529f56eSJonathan T. Looney automatically dump them to the
2782529f56eSJonathan T. Looney device */
2792529f56eSJonathan T. Looney TCP_LOG_STATE_CONTINUAL=4, /* Continually dump the data when full */
2802529f56eSJonathan T. Looney TCP_LOG_STATE_TAIL_AUTO=5, /* Keep the trailing events, and
2812529f56eSJonathan T. Looney automatically dump them when the
2822529f56eSJonathan T. Looney session ends */
28369c7c811SRandall Stewart TCP_LOG_VIA_BBPOINTS=6 /* Log only if the BB point has been configured */
2842529f56eSJonathan T. Looney };
2852529f56eSJonathan T. Looney
2862529f56eSJonathan T. Looney /* Use this if we don't know whether the operation succeeded. */
2872529f56eSJonathan T. Looney #define ERRNO_UNK (-1)
2882529f56eSJonathan T. Looney
2892529f56eSJonathan T. Looney /*
2902529f56eSJonathan T. Looney * If the user included dev/tcp_log/tcp_log_dev.h, then include our private
2912529f56eSJonathan T. Looney * headers. Otherwise, there is no reason to pollute all the files with an
2922529f56eSJonathan T. Looney * additional include.
2932529f56eSJonathan T. Looney *
2942529f56eSJonathan T. Looney * This structure is aligned to an 8-byte boundary to match the alignment
2952529f56eSJonathan T. Looney * requirements of (struct tcp_log_buffer).
2962529f56eSJonathan T. Looney */
2972529f56eSJonathan T. Looney #ifdef __tcp_log_dev_h__
2982529f56eSJonathan T. Looney struct tcp_log_header {
2992529f56eSJonathan T. Looney struct tcp_log_common_header tlh_common;
3002529f56eSJonathan T. Looney #define tlh_version tlh_common.tlch_version
3012529f56eSJonathan T. Looney #define tlh_type tlh_common.tlch_type
3022529f56eSJonathan T. Looney #define tlh_length tlh_common.tlch_length
3032529f56eSJonathan T. Looney struct in_endpoints tlh_ie;
3042529f56eSJonathan T. Looney struct timeval tlh_offset; /* Uptime -> UTC offset */
3052529f56eSJonathan T. Looney char tlh_id[TCP_LOG_ID_LEN];
3062529f56eSJonathan T. Looney char tlh_reason[TCP_LOG_REASON_LEN];
307a9a08eceSRandall Stewart char tlh_tag[TCP_LOG_TAG_LEN];
3082529f56eSJonathan T. Looney uint8_t tlh_af;
3092529f56eSJonathan T. Looney uint8_t _pad[7];
3102529f56eSJonathan T. Looney } ALIGN_TCP_LOG;
3112529f56eSJonathan T. Looney
3122529f56eSJonathan T. Looney #ifdef _KERNEL
3132529f56eSJonathan T. Looney struct tcp_log_dev_log_queue {
3142529f56eSJonathan T. Looney struct tcp_log_dev_queue tldl_common;
3152529f56eSJonathan T. Looney char tldl_id[TCP_LOG_ID_LEN];
3162529f56eSJonathan T. Looney char tldl_reason[TCP_LOG_REASON_LEN];
317a9a08eceSRandall Stewart char tldl_tag[TCP_LOG_TAG_LEN];
3182529f56eSJonathan T. Looney struct in_endpoints tldl_ie;
3192529f56eSJonathan T. Looney struct tcp_log_stailq tldl_entries;
3202529f56eSJonathan T. Looney int tldl_count;
3212529f56eSJonathan T. Looney uint8_t tldl_af;
3222529f56eSJonathan T. Looney };
3232529f56eSJonathan T. Looney #endif /* _KERNEL */
3242529f56eSJonathan T. Looney #endif /* __tcp_log_dev_h__ */
3252529f56eSJonathan T. Looney
32669c7c811SRandall Stewart /*
32769c7c811SRandall Stewart * Defined BBPOINTS that can be used
32869c7c811SRandall Stewart * with TCP_LOG_VIA_BBPOINTS.
32969c7c811SRandall Stewart */
33069c7c811SRandall Stewart #define TCP_BBPOINT_NONE 0
33169c7c811SRandall Stewart #define TCP_BBPOINT_REQ_LEVEL_LOGGING 1
33269c7c811SRandall Stewart
33369c7c811SRandall Stewart /*********************/
33469c7c811SRandall Stewart /* TCP Trace points */
33569c7c811SRandall Stewart /*********************/
33669c7c811SRandall Stewart /*
33769c7c811SRandall Stewart * TCP trace points are interesting points within
33869c7c811SRandall Stewart * the TCP code that the author/debugger may want
33969c7c811SRandall Stewart * to have BB logging enabled if we hit that point.
34069c7c811SRandall Stewart * In order to enable a trace point you set the
34169c7c811SRandall Stewart * sysctl var net.inet.tcp.bb.tp.number to
34269c7c811SRandall Stewart * one of the numbers listed below. You also
34369c7c811SRandall Stewart * must make sure net.inet.tcp.bb.tp.bbmode is
34469c7c811SRandall Stewart * non-zero, the default is 4 for continuous tracing.
34569c7c811SRandall Stewart * You also set in the number of connections you want
34669c7c811SRandall Stewart * have get BB logs in net.inet.tcp.bb.tp.count.
34769c7c811SRandall Stewart *
34869c7c811SRandall Stewart * Count will decrement every time BB logging is assigned
34969c7c811SRandall Stewart * to a connection that hit your tracepoint.
35069c7c811SRandall Stewart *
35169c7c811SRandall Stewart * You can enable all trace points by setting the number
35269c7c811SRandall Stewart * to 0xffffffff. You can disable all trace points by
35369c7c811SRandall Stewart * setting number to zero (or count to 0).
35469c7c811SRandall Stewart *
35569c7c811SRandall Stewart * Below are the enumerated list of tracepoints that
35669c7c811SRandall Stewart * have currently been defined in the code. Add more
35769c7c811SRandall Stewart * as you add a call to rack_trace_point(rack, <name>);
35869c7c811SRandall Stewart * where <name> is defined below.
35969c7c811SRandall Stewart */
36069c7c811SRandall Stewart #define TCP_TP_HWENOBUF 0x00000001 /* When we are doing hardware pacing and hit enobufs */
36169c7c811SRandall Stewart #define TCP_TP_ENOBUF 0x00000002 /* When we hit enobufs with software pacing */
36269c7c811SRandall Stewart #define TCP_TP_COLLAPSED_WND 0x00000003 /* When a peer to collapses its rwnd on us */
36369c7c811SRandall Stewart #define TCP_TP_COLLAPSED_RXT 0x00000004 /* When we actually retransmit a collapsed window rsm */
36457a3a161SRandall Stewart #define TCP_TP_REQ_LOG_FAIL 0x00000005 /* We tried to allocate a Request log but had no space */
36569c7c811SRandall Stewart #define TCP_TP_RESET_RCV 0x00000006 /* Triggers when we receive a RST */
366e18b97bdSRandall Stewart #define TCP_TP_POLICER_DET 0x00000007 /* When we detect a policer */
367e18b97bdSRandall Stewart #define TCP_TP_EXCESS_RXT TCP_TP_POLICER_DET /* alias */
36869c7c811SRandall Stewart #define TCP_TP_SAD_TRIGGERED 0x00000008 /* Sack Attack Detection triggers */
36969c7c811SRandall Stewart #define TCP_TP_SAD_SUSPECT 0x0000000a /* A sack has supicious information in it */
370e18b97bdSRandall Stewart #define TCP_TP_PACED_BOTTOM 0x0000000b /* We have paced at the bottom */
37169c7c811SRandall Stewart
3722529f56eSJonathan T. Looney #ifdef _KERNEL
3732529f56eSJonathan T. Looney
37469c7c811SRandall Stewart extern uint32_t tcp_trace_point_config;
37569c7c811SRandall Stewart extern uint32_t tcp_trace_point_bb_mode;
37669c7c811SRandall Stewart extern int32_t tcp_trace_point_count;
37769c7c811SRandall Stewart
37869c7c811SRandall Stewart /*
37969c7c811SRandall Stewart * Returns true if any sort of BB logging is enabled,
38069c7c811SRandall Stewart * commonly used throughout the codebase.
38169c7c811SRandall Stewart */
38269c7c811SRandall Stewart static inline int
tcp_bblogging_on(struct tcpcb * tp)38369c7c811SRandall Stewart tcp_bblogging_on(struct tcpcb *tp)
38469c7c811SRandall Stewart {
38569c7c811SRandall Stewart if (tp->_t_logstate <= TCP_LOG_STATE_OFF)
38669c7c811SRandall Stewart return (0);
38769c7c811SRandall Stewart if (tp->_t_logstate == TCP_LOG_VIA_BBPOINTS)
38869c7c811SRandall Stewart return (0);
38969c7c811SRandall Stewart return (1);
39069c7c811SRandall Stewart }
39169c7c811SRandall Stewart
39269c7c811SRandall Stewart /*
39369c7c811SRandall Stewart * Returns true if we match a specific bbpoint when
39469c7c811SRandall Stewart * in TCP_LOG_VIA_BBPOINTS, but also returns true
39569c7c811SRandall Stewart * for all the other logging states.
39669c7c811SRandall Stewart */
39769c7c811SRandall Stewart static inline int
tcp_bblogging_point_on(struct tcpcb * tp,uint8_t bbpoint)39869c7c811SRandall Stewart tcp_bblogging_point_on(struct tcpcb *tp, uint8_t bbpoint)
39969c7c811SRandall Stewart {
40069c7c811SRandall Stewart if (tp->_t_logstate <= TCP_LOG_STATE_OFF)
40169c7c811SRandall Stewart return (0);
40269c7c811SRandall Stewart if ((tp->_t_logstate == TCP_LOG_VIA_BBPOINTS) &&
40369c7c811SRandall Stewart (tp->_t_logpoint == bbpoint))
40469c7c811SRandall Stewart return (1);
40569c7c811SRandall Stewart else if (tp->_t_logstate == TCP_LOG_VIA_BBPOINTS)
40669c7c811SRandall Stewart return (0);
40769c7c811SRandall Stewart return (1);
40869c7c811SRandall Stewart }
40969c7c811SRandall Stewart
41069c7c811SRandall Stewart static inline void
tcp_set_bblog_state(struct tcpcb * tp,uint8_t ls,uint8_t bbpoint)41169c7c811SRandall Stewart tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint)
41269c7c811SRandall Stewart {
41369c7c811SRandall Stewart if ((ls == TCP_LOG_VIA_BBPOINTS) &&
41460bc1957SMichael Tuexen (tp->_t_logstate == TCP_LOG_STATE_OFF)){
41569c7c811SRandall Stewart /*
41669c7c811SRandall Stewart * We don't allow a BBPOINTS set to override
41769c7c811SRandall Stewart * other types of BB logging set by other means such
41869c7c811SRandall Stewart * as the bb_ratio/bb_state URL parameters. In other
41969c7c811SRandall Stewart * words BBlogging must be *off* in order to turn on
42069c7c811SRandall Stewart * a BBpoint.
42169c7c811SRandall Stewart */
42269c7c811SRandall Stewart tp->_t_logpoint = bbpoint;
42369c7c811SRandall Stewart tp->_t_logstate = ls;
42460bc1957SMichael Tuexen } else if (ls < TCP_LOG_VIA_BBPOINTS) {
42560bc1957SMichael Tuexen tp->_t_logpoint = TCP_BBPOINT_NONE;
42669c7c811SRandall Stewart tp->_t_logstate = ls;
42769c7c811SRandall Stewart }
42869c7c811SRandall Stewart }
42969c7c811SRandall Stewart
43069c7c811SRandall Stewart static inline uint32_t
tcp_get_bblog_state(struct tcpcb * tp)43169c7c811SRandall Stewart tcp_get_bblog_state(struct tcpcb *tp)
43269c7c811SRandall Stewart {
43369c7c811SRandall Stewart return (tp->_t_logstate);
43469c7c811SRandall Stewart }
43569c7c811SRandall Stewart
43669c7c811SRandall Stewart static inline void
tcp_trace_point(struct tcpcb * tp,int num)43769c7c811SRandall Stewart tcp_trace_point(struct tcpcb *tp, int num)
43869c7c811SRandall Stewart {
439113f56baSMichael Tuexen #ifdef TCP_BLACKBOX
44069c7c811SRandall Stewart if (((tcp_trace_point_config == num) ||
44169c7c811SRandall Stewart (tcp_trace_point_config == 0xffffffff)) &&
44269c7c811SRandall Stewart (tcp_trace_point_bb_mode != 0) &&
44369c7c811SRandall Stewart (tcp_trace_point_count > 0) &&
44469c7c811SRandall Stewart (tcp_bblogging_on(tp) == 0)) {
44569c7c811SRandall Stewart int res;
44669c7c811SRandall Stewart res = atomic_fetchadd_int(&tcp_trace_point_count, -1);
44769c7c811SRandall Stewart if (res > 0) {
44869c7c811SRandall Stewart tcp_set_bblog_state(tp, tcp_trace_point_bb_mode, TCP_BBPOINT_NONE);
44969c7c811SRandall Stewart } else {
45069c7c811SRandall Stewart /* Loss a race assure its zero now */
45169c7c811SRandall Stewart tcp_trace_point_count = 0;
45269c7c811SRandall Stewart }
45369c7c811SRandall Stewart }
454113f56baSMichael Tuexen #endif
45569c7c811SRandall Stewart }
45669c7c811SRandall Stewart
4573b0b41e6SRandall Stewart #define TCP_LOG_BUF_DEFAULT_SESSION_LIMIT 5000
4583b0b41e6SRandall Stewart #define TCP_LOG_BUF_DEFAULT_GLOBAL_LIMIT 5000000
4592529f56eSJonathan T. Looney
4602529f56eSJonathan T. Looney /*
4612529f56eSJonathan T. Looney * TCP_LOG_EVENT_VERBOSE: The same as TCP_LOG_EVENT, except it always
4622529f56eSJonathan T. Looney * tries to record verbose information.
4632529f56eSJonathan T. Looney */
4642529f56eSJonathan T. Looney #define TCP_LOG_EVENT_VERBOSE(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder, tv) \
4652529f56eSJonathan T. Looney do { \
46669c7c811SRandall Stewart if (tcp_bblogging_on(tp)) \
46769c7c811SRandall Stewart tcp_log_event(tp, th, rxbuf, txbuf, eventid, \
4682529f56eSJonathan T. Looney errornum, len, stackinfo, th_hostorder, \
4692529f56eSJonathan T. Looney tp->t_output_caller, __func__, __LINE__, tv);\
4702529f56eSJonathan T. Looney } while (0)
4712529f56eSJonathan T. Looney
4722529f56eSJonathan T. Looney /*
4732529f56eSJonathan T. Looney * TCP_LOG_EVENT: This is a macro so we can capture function/line
47469c7c811SRandall Stewart * information when needed. You can use the macro when you are not
47569c7c811SRandall Stewart * doing a lot of prep in the stack specific information i.e. you
47669c7c811SRandall Stewart * don't add extras (stackinfo). If you are adding extras which
47769c7c811SRandall Stewart * means filling out a stack variable instead use the tcp_log_event()
47869c7c811SRandall Stewart * function but enclose the call to the log (and all the setup) in a
47969c7c811SRandall Stewart * if (tcp_bblogging_on(tp)) {
48069c7c811SRandall Stewart * ... setup and logging call ...
48169c7c811SRandall Stewart * }
48269c7c811SRandall Stewart *
48369c7c811SRandall Stewart * Always use the macro tcp_bblogging_on() since sometimes the defintions
48469c7c811SRandall Stewart * do change.
48569c7c811SRandall Stewart *
48669c7c811SRandall Stewart * BBlogging also supports the concept of a BBpoint. The idea behind this
48769c7c811SRandall Stewart * is that when you set a specific BBpoint on and turn the logging into
48869c7c811SRandall Stewart * the BBpoint mode (TCP_LOG_VIA_BBPOINTS) you will be defining very very
48969c7c811SRandall Stewart * few of these points to come out. The point is specific to a code you
49069c7c811SRandall Stewart * want tied to that one BB logging. This allows you to turn on a much broader
49169c7c811SRandall Stewart * scale set of limited logging on more connections without overwhelming the
49269c7c811SRandall Stewart * I/O system with too much BBlogs. This of course means you need to be quite
49369c7c811SRandall Stewart * careful on how many BBlogs go with each point, but you can have multiple points
49469c7c811SRandall Stewart * only one of which is active at a time.
49569c7c811SRandall Stewart *
49669c7c811SRandall Stewart * To define a point you add it above under the define for TCP_BBPOINT_NONE (which
49769c7c811SRandall Stewart * is the default i.e. no point is defined. You then, for your point use the
49869c7c811SRandall Stewart * tcp_bblogging_point_on(struct tcpcb *tp, uint8_t bbpoint) inline to enclose
49969c7c811SRandall Stewart * your call to tcp_log_event. Do not use one of the TCP_LOGGING macros else
50069c7c811SRandall Stewart * your point will never come out. You specify your defined point in the bbpoint
50169c7c811SRandall Stewart * side of the inline. An example of this you can find in rack where the
50269c7c811SRandall Stewart * TCP_BBPOINT_REQ_LEVEL_LOGGING is used. There a specific set of logs are generated
50357a3a161SRandall Stewart * for each request that tcp is tracking.
50469c7c811SRandall Stewart *
50569c7c811SRandall Stewart * When turning on BB logging use the inline:
50669c7c811SRandall Stewart * tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint)
50769c7c811SRandall Stewart * the ls field is the logging state TCP_LOG_STATE_CONTINUAL etc. The
50869c7c811SRandall Stewart * bbpoint field is ignored unless the ls field is set to TCP_LOG_VIA_BBPOINTS.
50969c7c811SRandall Stewart * Currently there is only a socket option that turns on the non-BBPOINT
51069c7c811SRandall Stewart * logging.
5112529f56eSJonathan T. Looney *
5122529f56eSJonathan T. Looney * Prototype:
5132529f56eSJonathan T. Looney * TCP_LOG_EVENT(struct tcpcb *tp, struct tcphdr *th, struct sockbuf *rxbuf,
5142529f56eSJonathan T. Looney * struct sockbuf *txbuf, uint8_t eventid, int errornum,
5152529f56eSJonathan T. Looney * union tcp_log_stackspecific *stackinfo)
5162529f56eSJonathan T. Looney *
5172529f56eSJonathan T. Looney * tp is mandatory and must be write locked.
5182529f56eSJonathan T. Looney * th is optional; if present, it will appear in the record.
5192529f56eSJonathan T. Looney * rxbuf and txbuf are optional; if present, they will appear in the record.
5202529f56eSJonathan T. Looney * eventid is mandatory.
5212529f56eSJonathan T. Looney * errornum is mandatory (it indicates the success or failure of the
5222529f56eSJonathan T. Looney * operation associated with the event).
5232529f56eSJonathan T. Looney * len indicates the length of the packet. If no packet, use 0.
5242529f56eSJonathan T. Looney * stackinfo is optional; if present, it will appear in the record.
5252529f56eSJonathan T. Looney */
526326f4556SGleb Smirnoff struct tcpcb;
5272529f56eSJonathan T. Looney #ifdef TCP_LOG_FORCEVERBOSE
5282529f56eSJonathan T. Looney #define TCP_LOG_EVENT TCP_LOG_EVENT_VERBOSE
5292529f56eSJonathan T. Looney #else
5302529f56eSJonathan T. Looney #define TCP_LOG_EVENT(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder) \
5312529f56eSJonathan T. Looney do { \
5322529f56eSJonathan T. Looney if (tcp_log_verbose) \
5332529f56eSJonathan T. Looney TCP_LOG_EVENT_VERBOSE(tp, th, rxbuf, txbuf, \
5342529f56eSJonathan T. Looney eventid, errornum, len, stackinfo, \
5352529f56eSJonathan T. Looney th_hostorder, NULL); \
53669c7c811SRandall Stewart else if (tcp_bblogging_on(tp)) \
53769c7c811SRandall Stewart tcp_log_event(tp, th, rxbuf, txbuf, eventid, \
5382529f56eSJonathan T. Looney errornum, len, stackinfo, th_hostorder, \
5392529f56eSJonathan T. Looney NULL, NULL, 0, NULL); \
5402529f56eSJonathan T. Looney } while (0)
5412529f56eSJonathan T. Looney #endif /* TCP_LOG_FORCEVERBOSE */
5422529f56eSJonathan T. Looney #define TCP_LOG_EVENTP(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder, tv) \
5432529f56eSJonathan T. Looney do { \
54469c7c811SRandall Stewart if (tcp_bblogging_on(tp)) \
54569c7c811SRandall Stewart tcp_log_event(tp, th, rxbuf, txbuf, eventid, \
5462529f56eSJonathan T. Looney errornum, len, stackinfo, th_hostorder, \
5472529f56eSJonathan T. Looney NULL, NULL, 0, tv); \
5482529f56eSJonathan T. Looney } while (0)
5492529f56eSJonathan T. Looney
550e24e5683SJonathan T. Looney #ifdef TCP_BLACKBOX
5512529f56eSJonathan T. Looney extern bool tcp_log_verbose;
5522529f56eSJonathan T. Looney void tcp_log_drain(struct tcpcb *tp);
5532529f56eSJonathan T. Looney int tcp_log_dump_tp_logbuf(struct tcpcb *tp, char *reason, int how, bool force);
5542529f56eSJonathan T. Looney void tcp_log_dump_tp_bucket_logbufs(struct tcpcb *tp, char *reason);
55569c7c811SRandall Stewart struct tcp_log_buffer *tcp_log_event(struct tcpcb *tp, struct tcphdr *th, struct sockbuf *rxbuf,
5562529f56eSJonathan T. Looney struct sockbuf *txbuf, uint8_t eventid, int errornum, uint32_t len,
5572529f56eSJonathan T. Looney union tcp_log_stackspecific *stackinfo, int th_hostorder,
5582529f56eSJonathan T. Looney const char *output_caller, const char *func, int line, const struct timeval *tv);
5592529f56eSJonathan T. Looney size_t tcp_log_get_id(struct tcpcb *tp, char *buf);
560a9a08eceSRandall Stewart size_t tcp_log_get_tag(struct tcpcb *tp, char *buf);
5612529f56eSJonathan T. Looney u_int tcp_log_get_id_cnt(struct tcpcb *tp);
5622529f56eSJonathan T. Looney int tcp_log_getlogbuf(struct sockopt *sopt, struct tcpcb *tp);
5632529f56eSJonathan T. Looney void tcp_log_init(void);
5642529f56eSJonathan T. Looney int tcp_log_set_id(struct tcpcb *tp, char *id);
565a9a08eceSRandall Stewart int tcp_log_set_tag(struct tcpcb *tp, char *tag);
5662529f56eSJonathan T. Looney int tcp_log_state_change(struct tcpcb *tp, int state);
5672529f56eSJonathan T. Looney void tcp_log_tcpcbinit(struct tcpcb *tp);
5682529f56eSJonathan T. Looney void tcp_log_tcpcbfini(struct tcpcb *tp);
5692529f56eSJonathan T. Looney void tcp_log_flowend(struct tcpcb *tp);
57069c7c811SRandall Stewart void tcp_log_sendfile(struct socket *so, off_t offset, size_t nbytes,
57169c7c811SRandall Stewart int flags);
57269c7c811SRandall Stewart int tcp_log_apply_ratio(struct tcpcb *tp, int ratio);
573e24e5683SJonathan T. Looney #else /* !TCP_BLACKBOX */
574e24e5683SJonathan T. Looney #define tcp_log_verbose (false)
575e24e5683SJonathan T. Looney
576e24e5683SJonathan T. Looney static inline struct tcp_log_buffer *
tcp_log_event(struct tcpcb * tp,struct tcphdr * th,struct sockbuf * rxbuf,struct sockbuf * txbuf,uint8_t eventid,int errornum,uint32_t len,union tcp_log_stackspecific * stackinfo,int th_hostorder,const char * output_caller,const char * func,int line,const struct timeval * tv)57769c7c811SRandall Stewart tcp_log_event(struct tcpcb *tp, struct tcphdr *th, struct sockbuf *rxbuf,
578e24e5683SJonathan T. Looney struct sockbuf *txbuf, uint8_t eventid, int errornum, uint32_t len,
579e24e5683SJonathan T. Looney union tcp_log_stackspecific *stackinfo, int th_hostorder,
580e24e5683SJonathan T. Looney const char *output_caller, const char *func, int line,
581e24e5683SJonathan T. Looney const struct timeval *tv)
582e24e5683SJonathan T. Looney {
583e24e5683SJonathan T. Looney
584e24e5683SJonathan T. Looney return (NULL);
585e24e5683SJonathan T. Looney }
586e24e5683SJonathan T. Looney #endif /* TCP_BLACKBOX */
5872529f56eSJonathan T. Looney
5882529f56eSJonathan T. Looney #endif /* _KERNEL */
5892529f56eSJonathan T. Looney #endif /* __tcp_log_buf_h__ */
590