i was trying to figure out which bit of ldpd had the pfkey socket (cos
reading code is hard sometimes), but had to work a little bit too hard
to figure it out from what fstat currently prints. this has fstat printf
"pfkey" when it hits an AF_KEY socket, rather than hit the default
handler which prints "30 raw 2 0x0".

ok?

Index: fstat.c
===================================================================
RCS file: /cvs/src/usr.bin/fstat/fstat.c,v
retrieving revision 1.95
diff -u -p -r1.95 fstat.c
--- fstat.c     16 Sep 2018 02:44:06 -0000      1.95
+++ fstat.c     21 Jan 2019 03:11:13 -0000
@@ -788,6 +788,10 @@ socktrans(struct kinfo_file *kf)
                printf(" %d ", kf->so_protocol);
                hide((void *)(uintptr_t)kf->f_data);
                break;
+       case AF_KEY:
+               printf("* pfkey");
+               hide((void *)(uintptr_t)kf->f_data);
+               break;
        default:
                /* print protocol number and socket address */
                printf("* %d %s", kf->so_family, stype);

Reply via email to