diff --git a/lib/handlers.c b/lib/handlers.c index f13b89e..016f010 100644 --- a/lib/handlers.c +++ b/lib/handlers.c @@ -40,11 +40,12 @@ static void print_header_content(FILE *ofd, struct nlmsghdr *n) { char flags[128]; char type[32]; - + uint32_t pid = n->nlmsg_pid & 0x3FFFFF; /* Print the correct PID, not our internal value */ + fprintf(ofd, "type=%s length=%u flags=<%s> sequence-nr=%u pid=%u", nl_nlmsgtype2str(n->nlmsg_type, type, sizeof(type)), n->nlmsg_len, nl_nlmsg_flags2str(n->nlmsg_flags, flags, - sizeof(flags)), n->nlmsg_seq, n->nlmsg_pid); + sizeof(flags)), n->nlmsg_seq, pid); } static int nl_valid_handler_verbose(struct nl_msg *msg, void *arg)