2 * Routines for Intel ANS probe dissection
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 2003 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
10 * The following information was graciously provided by Intel:
11 * Offset Size (bytes) Contents
12 * 0 6 Destination Broadcast probes: {FF,FF,FF,FF,FF,FF}
13 * Multicast probes: {01,AA,00,00,00,00}
14 * 6 6 Source Matches the CurrentMACAddress of the
15 * adapter sending the probe.
16 * 8 2 Type Network order is 0x886D, Intel's reserved
18 * 10 (0) 2 ApplicationID Network order is 0x0001, identifies
19 * it as fault tolerance probe.
20 * 12 (2) 2 RevID Network order, identifies the revision id
21 * of Teaming software.
22 * 16 (4) 4 ProbeSequenceNumber Ascending sequence number
23 * that identifies the current probing cycle.
24 * 20 (8) 2 SenderID Unique ID within a team identifying
25 * the member that originally sent the probe.
26 * 22 (10) 6 TeamID Unique ID identifying the team in charge
34 #include <epan/packet.h>
35 #include <epan/to_str.h>
36 #include <epan/etypes.h>
38 void proto_register_ans(void);
39 void proto_reg_handoff_ans(void);
41 static dissector_handle_t ans_handle
;
43 /* Initialize the protocol and registered fields */
46 static int hf_ans_app_id
;
47 static int hf_ans_rev_id
;
48 static int hf_ans_seq_num
;
49 static int hf_ans_sender_id
;
50 static int hf_ans_team_id
;
52 /* Initialize the subtree pointers */
55 /* Code to actually dissect the packets */
57 dissect_ans(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
64 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "Intel ANS probe");
66 seq_num
= tvb_get_ntohl(tvb
, 4);
67 sender_id
= tvb_get_ntohs(tvb
, 8);
69 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Sequence: %u, Sender ID %u, Team ID %s",
70 seq_num
, sender_id
, tvb_ether_to_str(pinfo
->pool
, tvb
, 10));
72 ti
= proto_tree_add_item(tree
, proto_ans
, tvb
, 0, -1, ENC_NA
);
73 ans_tree
= proto_item_add_subtree(ti
, ett_ans
);
75 proto_tree_add_item(ans_tree
, hf_ans_app_id
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
76 proto_tree_add_item(ans_tree
, hf_ans_rev_id
, tvb
, 2, 2, ENC_BIG_ENDIAN
);
77 proto_tree_add_item(ans_tree
, hf_ans_seq_num
, tvb
, 4, 4, ENC_BIG_ENDIAN
);
78 proto_tree_add_item(ans_tree
, hf_ans_sender_id
, tvb
, 8, 2, ENC_BIG_ENDIAN
);
79 proto_tree_add_item(ans_tree
, hf_ans_team_id
, tvb
, 10, 6, ENC_NA
);
81 return tvb_captured_length(tvb
);
86 proto_register_ans(void)
88 static hf_register_info hf
[] = {
90 { "Application ID", "ans.app_id",
91 FT_UINT16
, BASE_HEX
, NULL
, 0,
92 "Intel ANS Application ID", HFILL
}
95 { "Revision ID", "ans.rev_id",
96 FT_UINT16
, BASE_HEX
, NULL
, 0,
97 "Intel ANS Revision ID", HFILL
}
100 { "Sequence Number", "ans.seq_num",
101 FT_UINT32
, BASE_DEC
, NULL
, 0,
102 "Intel ANS Sequence Number", HFILL
}
105 { "Sender ID", "ans.sender_id",
106 FT_UINT16
, BASE_DEC
, NULL
, 0,
107 "Intel ANS Sender ID", HFILL
}
110 { "Team ID", "ans.team_id",
111 FT_ETHER
, BASE_NONE
, NULL
, 0,
112 "Intel ANS Team ID", HFILL
}
116 static int *ett
[] = {
120 proto_ans
= proto_register_protocol("Intel ANS probe", "ANS", "ans");
121 proto_register_field_array(proto_ans
, hf
, array_length(hf
));
122 proto_register_subtree_array(ett
, array_length(ett
));
124 ans_handle
= register_dissector("ans", dissect_ans
, proto_ans
);
129 proto_reg_handoff_ans(void)
131 dissector_add_uint("ethertype", ETHERTYPE_INTEL_ANS
, ans_handle
);
135 * Editor modelines - https://www.wireshark.org/tools/modelines.html
140 * indent-tabs-mode: t
143 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
144 * :indentSize=8:tabSize=8:noTabs=false: