Add #define for nlmsg_type = 15
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
fprintf(fp, "[MDB]");
return print_mdb(who, n, arg);
- case 15:
+ case NLMSG_TSTAMP:
return show_mark(fp, n);
default:
return 0;
}
-
-
}
int do_monitor(int argc, char **argv)
#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
#endif
+/* User defined nlmsg_type which is used mostly for logging netlink
+ * messages from dump file */
+#define NLMSG_TSTAMP 15
+
#endif /* __LIBNETLINK_H__ */
print_netconf(who, n, arg);
return 0;
}
- if (n->nlmsg_type == 15) {
+ if (n->nlmsg_type == NLMSG_TSTAMP) {
char *tstr;
time_t secs = ((__u32*)NLMSG_DATA(n))[0];
long usecs = ((__u32*)NLMSG_DATA(n))[1];
struct nlmsghdr *n1 = (void*)buf;
struct timeval tv;
- n1->nlmsg_type = 15;
+ n1->nlmsg_type = NLMSG_TSTAMP;
n1->nlmsg_flags = 0;
n1->nlmsg_seq = 0;
n1->nlmsg_pid = 0;