Home | History | Annotate | Download | only in conntrack

Lines Matching refs:ct

164 				   const struct nf_conntrack *ct,
171 (unsigned long long)ct->counters[type].packets);
175 (unsigned long long)ct->counters[type].bytes);
183 const struct nf_conntrack *ct)
189 (unsigned long long)ct->timestamp.start);
197 const struct nf_conntrack *ct)
203 (unsigned long long)ct->timestamp.stop);
211 const struct nf_conntrack *ct)
218 delta_time = now - (time_t)(ct->timestamp.start / NSEC_PER_SEC);
228 __snprintf_deltatime(char *buf, unsigned int len, const struct nf_conntrack *ct)
232 time_t delta_time = (time_t)((ct->timestamp.stop -
233 ct->timestamp.start) / NSEC_PER_SEC);
243 __snprintf_helper_name(char *buf, unsigned int len, const struct nf_conntrack *ct)
248 ret = snprintf(buf+offset, len, "<helper>%s</helper>", ct->helper_name);
286 const struct nf_conntrack *ct,
295 tuple = &ct->head.orig;
298 tuple = &ct->repl;
338 if (test_bit(ATTR_ORIG_COUNTER_PACKETS, ct->head.set) &&
339 test_bit(ATTR_ORIG_COUNTER_BYTES, ct->head.set)) {
343 ret = __snprintf_counters_xml(buf+offset, len, ct, dir);
358 const struct nf_conntrack *ct, struct nfct_labelmap *map)
360 const struct nfct_bitmask *b = nfct_get_attr(ct, ATTR_CONNLABELS);
381 const struct nf_conntrack *ct,
406 ret = __snprintf_tuple_xml(buf+offset, len, ct, __DIR_ORIG,
407 test_bit(ATTR_ORIG_ZONE, ct->head.set));
410 ret = __snprintf_tuple_xml(buf+offset, len, ct, __DIR_REPL,
411 test_bit(ATTR_REPL_ZONE, ct->head.set));
414 if (test_bit(ATTR_TCP_STATE, ct->head.set) ||
415 test_bit(ATTR_SCTP_STATE, ct->head.set) ||
416 test_bit(ATTR_DCCP_STATE, ct->head.set) ||
417 test_bit(ATTR_TIMEOUT, ct->head.set) ||
418 test_bit(ATTR_MARK, ct->head.set) ||
419 test_bit(ATTR_SECMARK, ct->head.set) ||
420 test_bit(ATTR_ZONE, ct->head.set) ||
421 test_bit(ATTR_USE, ct->head.set) ||
422 test_bit(ATTR_STATUS, ct->head.set) ||
423 test_bit(ATTR_ID, ct->head.set) ||
424 test_bit(ATTR_CONNLABELS, ct->head.set) ||
425 test_bit(ATTR_TIMESTAMP_START, ct->head.set) ||
426 test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
432 if (test_bit(ATTR_TCP_STATE, ct->head.set)) {
434 ct->protoinfo.tcp.state < TCP_CONNTRACK_MAX ?
435 states[ct->protoinfo.tcp.state] :
440 if (test_bit(ATTR_SCTP_STATE, ct->head.set)) {
442 ct->protoinfo.sctp.state < SCTP_CONNTRACK_MAX ?
443 states[ct->protoinfo.sctp.state] :
448 if (test_bit(ATTR_DCCP_STATE, ct->head.set)) {
450 ct->protoinfo.sctp.state < DCCP_CONNTRACK_MAX ?
451 states[ct->protoinfo.dccp.state] :
456 if (test_bit(ATTR_TIMEOUT, ct->head.set)) {
458 "<timeout>%u</timeout>", ct->timeout);
462 if (test_bit(ATTR_MARK, ct->head.set)) {
463 ret = snprintf(buf+offset, len, "<mark>%u</mark>", ct->mark);
467 if (map && test_bit(ATTR_CONNLABELS, ct->head.set)) {
468 ret = __snprintf_clabels_xml(buf+offset, len, ct, map);
472 if (test_bit(ATTR_SECMARK, ct->head.set)) {
474 "<secmark>%u</secmark>", ct->secmark);
478 if (test_bit(ATTR_SECCTX, ct->head.set)) {
480 "<secctx>%s</secctx>", ct->secctx);
484 if (test_bit(ATTR_ZONE, ct->head.set)) {
485 ret = snprintf(buf+offset, len, "<zone>%u</zone>", ct->zone);
489 if (test_bit(ATTR_USE, ct->head.set)) {
490 ret = snprintf(buf+offset, len, "<use>%u</use>", ct->use);
494 if (test_bit(ATTR_ID, ct->head.set)) {
495 ret = snprintf(buf+offset, len, "<id>%u</id>", ct->id);
499 if (test_bit(ATTR_STATUS, ct->head.set)
500 && ct->status & IPS_ASSURED) {
505 if (test_bit(ATTR_STATUS, ct->head.set)
506 && !(ct->status & IPS_SEEN_REPLY)) {
512 if (test_bit(ATTR_TIMESTAMP_START, ct->head.set) ||
513 test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
517 if (test_bit(ATTR_TIMESTAMP_START, ct->head.set)) {
518 ret = __snprintf_timestamp_start(buf+offset, len, ct);
521 if (test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
522 ret = __snprintf_timestamp_stop(buf+offset, len, ct);
525 if (test_bit(ATTR_TIMESTAMP_START, ct->head.set) ||
526 test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
531 if (test_bit(ATTR_TIMESTAMP_START, ct->head.set) &&
532 test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
533 ret = __snprintf_deltatime(buf+offset, len, ct);
535 } else if (test_bit(ATTR_TIMESTAMP_START, ct->head.set)) {
536 ret = __snprintf_deltatime_now(buf+offset, len, ct);
540 if (test_bit(ATTR_TCP_STATE, ct->head.set) ||
541 test_bit(ATTR_SCTP_STATE, ct->head.set) ||
542 test_bit(ATTR_DCCP_STATE, ct->head.set) ||
543 test_bit(ATTR_TIMEOUT, ct->head.set) ||
544 test_bit(ATTR_MARK, ct->head.set) ||
545 test_bit(ATTR_SECMARK, ct->head.set) ||
546 test_bit(ATTR_ZONE, ct->head.set) ||
547 test_bit(ATTR_USE, ct->head.set) ||
548 test_bit(ATTR_STATUS, ct->head.set) ||
549 test_bit(ATTR_ID, ct->head.set) ||
550 test_bit(ATTR_CONNLABELS, ct->head.set) ||
551 test_bit(ATTR_TIMESTAMP_START, ct->head.set) ||
552 test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
575 if (test_bit(ATTR_HELPER_NAME, ct->head.set)) {
576 ret = __snprintf_helper_name(buf+offset, len, ct);