Changeset View
Changeset View
Standalone View
Standalone View
sbin/pfctl/pf_print_state.c
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | if (s->sync_flags & PFSYNC_FLAG_NATSRCNODE) | ||||
printf(", sticky-address"); | printf(", sticky-address"); | ||||
printf("\n"); | printf("\n"); | ||||
} | } | ||||
if (opts & PF_OPT_VERBOSE2) { | if (opts & PF_OPT_VERBOSE2) { | ||||
u_int64_t id; | u_int64_t id; | ||||
bcopy(&s->id, &id, sizeof(u_int64_t)); | bcopy(&s->id, &id, sizeof(u_int64_t)); | ||||
printf(" id: %016jx creatorid: %08x", id, s->creatorid); | printf(" id: %016jx creatorid: %08x", id, s->creatorid); | ||||
printf(" gateway: "); | printf(" gateway: "); | ||||
eri: Is the whitespace here intentional? | |||||
Done Inline ActionsYes. There was more whitespace there than there was supposed to be (it's on the same line as id / creatorid) so I'm removing that while we're here. kp: Yes. There was more whitespace there than there was supposed to be (it's on the same line as id… | |||||
print_host(&s->rt_addr, 0, af, opts); | print_host(&s->rt_addr, 0, af, opts); | ||||
printf("\n"); | printf("\n"); | ||||
if (strcmp(s->ifname, s->orig_ifname) != 0) | |||||
Not Done Inline ActionsCan you avoid strcmp even though existing code has it? eri: Can you avoid strcmp even though existing code has it? | |||||
Not Done Inline ActionsI don't follow. The intent here is to only display 'origif' if it's different from the ifname we've already printed. I.e. when we're a floating state. kp: I don't follow. The intent here is to only display 'origif' if it's different from the ifname… | |||||
printf(" origif: %s\n", s->orig_ifname); | |||||
} | } | ||||
} | } | ||||
int | int | ||||
unmask(struct pf_addr *m, sa_family_t af) | unmask(struct pf_addr *m, sa_family_t af) | ||||
{ | { | ||||
int i = 31, j = 0, b = 0; | int i = 31, j = 0, b = 0; | ||||
u_int32_t tmp; | u_int32_t tmp; | ||||
Show All 12 Lines |
Is the whitespace here intentional?