diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-12-08 19:30:33 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-12-08 19:30:33 +0000 |
commit | 64456261b9214f7b8bd520f74cbaee26d95b5f3e (patch) | |
tree | f1451d7171551cf4ae7c6a5aa4dfccbdc6237d67 /epan/dissectors/packet-netlink.c | |
parent | fab9e520551ed2b92d85a7676ed67caf64f41f6b (diff) |
Improve netlink dissection:
- add standard message types
- add dissection for WS_RTM_*NEIGH
- add BASE_CUSTOM functions to print bitfields
svn path=/trunk/; revision=53864
Diffstat (limited to 'epan/dissectors/packet-netlink.c')
-rw-r--r-- | epan/dissectors/packet-netlink.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/epan/dissectors/packet-netlink.c b/epan/dissectors/packet-netlink.c index 51fe73cf67..5b11b4110c 100644 --- a/epan/dissectors/packet-netlink.c +++ b/epan/dissectors/packet-netlink.c @@ -40,7 +40,7 @@ */ #define SLL_HEADER_SIZE 16 /* total header length */ -static const value_string ltype_vals[] = { +static const value_string family_vals[] = { { WS_NETLINK_ROUTE, "Route" }, { WS_NETLINK_UNUSED, "Unused" }, { WS_NETLINK_USERSOCK, "user-mode" }, @@ -65,6 +65,13 @@ static const value_string ltype_vals[] = { { 0, NULL } }; +static const value_string type_vals[] = { + { WS_NLMSG_NOOP, "nothing" }, + { WS_NLMSG_ERROR, "error" }, + { WS_NLMSG_DONE, "end of a dump" }, + { WS_NLMSG_OVERRUN, "data lost" }, + { 0, NULL } +}; static dissector_handle_t netlink_handle; @@ -79,7 +86,7 @@ static header_field_info hfi_netlink_hatype NETLINK_HFI_INIT = /* Linux netlink protocol type */ static header_field_info hfi_netlink_family NETLINK_HFI_INIT = { "Family", "netlink.family", FT_UINT16, BASE_HEX, - VALS(ltype_vals), 0x00, NULL, HFILL }; + VALS(family_vals), 0x00, NULL, HFILL }; static header_field_info hfi_netlink_hdr_len NETLINK_HFI_INIT = @@ -88,7 +95,7 @@ static header_field_info hfi_netlink_hdr_len NETLINK_HFI_INIT = static header_field_info hfi_netlink_hdr_type NETLINK_HFI_INIT = { "Type", "netlink.hdr_type", FT_UINT16, BASE_HEX, - NULL, 0x00, NULL, HFILL }; + VALS(type_vals), 0x00, NULL, HFILL }; static header_field_info hfi_netlink_hdr_flags NETLINK_HFI_INIT = { "Flags", "netlink.hdr_flags", FT_UINT16, BASE_HEX, |