Last active
August 9, 2016 05:30
-
-
Save groundwater/c0fda11aeb037cbde9b80f295c8935d0 to your computer and use it in GitHub Desktop.
Revisions
-
groundwater renamed this gist
Aug 9, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
groundwater created this gist
Aug 9, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ struct kevent { uintptr_t ident; /* identifier for this event */ int16_t filter; /* filter for event */ uint16_t flags; /* general flags */ uint32_t fflags; /* filter-specific flags */ intptr_t data; /* filter-specific data */ void *udata; /* opaque user data identifier */ } kevent; ::kevent:entry /pid == $target && arg3 != NULL/ { k = arg3; } ::kevent:return /pid == $target && k != NULL/ { x = (struct kevent *) copyin(k, sizeof(kevent)); printf("FD: %d, Size: %d, Flags: %d, PTR: %d", x->ident, x->data, x->flags, x->filter); k = NULL; } /* ::kevent:entry /pid == $target && arg1 != NULL/ { x = (struct kevent *) copyin(arg1, sizeof(kevent)); printf("> Sock: %d, Flags: %d", x->ident, x->flags); } */