|
Lines 268-273
Link Here
|
| 268 |
|
268 |
|
| 269 |
static struct inpcb *tcp_notify(struct inpcb *, int); |
269 |
static struct inpcb *tcp_notify(struct inpcb *, int); |
| 270 |
static void tcp_isn_tick(void *); |
270 |
static void tcp_isn_tick(void *); |
|
|
271 |
static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, |
| 272 |
void *ip4hdr, const void *ip6hdr); |
| 271 |
|
273 |
|
| 272 |
/* |
274 |
/* |
| 273 |
* Target size of TCP PCB hash tables. Must be a power of two. |
275 |
* Target size of TCP PCB hash tables. Must be a power of two. |
|
Lines 2233-2241
Link Here
|
| 2233 |
* and ip6_hdr pointers have to be passed as void pointers. |
2235 |
* and ip6_hdr pointers have to be passed as void pointers. |
| 2234 |
*/ |
2236 |
*/ |
| 2235 |
char * |
2237 |
char * |
|
|
2238 |
tcp_log_vain(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, |
| 2239 |
const void *ip6hdr) |
| 2240 |
{ |
| 2241 |
|
| 2242 |
/* Is logging enabled? */ |
| 2243 |
if (tcp_log_in_vain == 0) |
| 2244 |
return (NULL); |
| 2245 |
|
| 2246 |
return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); |
| 2247 |
} |
| 2248 |
|
| 2249 |
char * |
| 2236 |
tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, |
2250 |
tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, |
| 2237 |
const void *ip6hdr) |
2251 |
const void *ip6hdr) |
| 2238 |
{ |
2252 |
{ |
|
|
2253 |
|
| 2254 |
/* Is logging enabled? */ |
| 2255 |
if (tcp_log_debug == 0) |
| 2256 |
return (NULL); |
| 2257 |
|
| 2258 |
return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); |
| 2259 |
} |
| 2260 |
|
| 2261 |
static char * |
| 2262 |
tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, |
| 2263 |
const void *ip6hdr) |
| 2264 |
{ |
| 2239 |
char *s, *sp; |
2265 |
char *s, *sp; |
| 2240 |
size_t size; |
2266 |
size_t size; |
| 2241 |
struct ip *ip; |
2267 |
struct ip *ip; |
|
Lines 2258-2267
Link Here
|
| 2258 |
2 * INET_ADDRSTRLEN; |
2284 |
2 * INET_ADDRSTRLEN; |
| 2259 |
#endif /* INET6 */ |
2285 |
#endif /* INET6 */ |
| 2260 |
|
2286 |
|
| 2261 |
/* Is logging enabled? */ |
|
|
| 2262 |
if (tcp_log_debug == 0 && tcp_log_in_vain == 0) |
| 2263 |
return (NULL); |
| 2264 |
|
| 2265 |
s = malloc(size, M_TCPLOG, M_ZERO|M_NOWAIT); |
2287 |
s = malloc(size, M_TCPLOG, M_ZERO|M_NOWAIT); |
| 2266 |
if (s == NULL) |
2288 |
if (s == NULL) |
| 2267 |
return (NULL); |
2289 |
return (NULL); |