protocols.json revision 15734de2
1[
2  {
3    "id": "Ether",
4    "name": "Ethernet II",
5    "fields": [
6      {
7        "id": "dst",
8        "name": "Destination",
9        "type": "MAC_ADDRESS",
10        "regex": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"
11      },
12      {
13        "id": "src",
14        "name": "Source",
15        "type": "MAC_ADDRESS",
16        "regex": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$"
17      },
18      {
19        "id": "type",
20        "name": "Type"
21      }
22    ],
23    "payload": ["IP", "IPv6", "Dot1Q", "Raw"]
24  },
25  {
26    "id": "IP",
27    "name": "IPv4",
28    "fields": [
29      {
30        "id": "version",
31        "name": "Version"
32      },
33      {
34        "id": "ihl",
35        "name": "IHL",
36        "type": "NUMBER",
37        "auto": true
38      },
39      {
40        "id": "tos",
41        "name": "TOS",
42        "type": "NUMBER"
43      },
44      {
45        "id": "len",
46        "name": "Total Length",
47        "type": "NUMBER",
48        "auto": true
49      },
50      {
51        "id": "id",
52        "name": "Identification",
53        "type": "NUMBER"
54      },
55      {
56        "id": "flags",
57        "name": "Flags",
58        "type": "BITMASK",
59        "bits": [
60          {"name": "Reserved", "mask": 4, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 4}]},
61          {"name": "Fragment", "mask": 2, "values":[{"name":"May fragment (0)", "value": 0}, {"name":"Don't fragment (1)", "value": 2}]},
62          {"name": "More Fragments(MF)", "mask": 1, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 1}]}
63        ]
64      },
65      {
66        "id": "frag",
67        "name": "Fragment offset",
68        "type": "NUMBER"
69      },
70      {
71        "id": "ttl",
72        "name": "TTL",
73        "type": "NUMBER",
74        "min": 1,
75        "max": 255
76        
77      },
78      {
79        "id": "proto",
80        "name": "Protocol"
81      },
82      {
83        "id": "chksum",
84        "name": "Checksum",
85        "type": "STRING",
86        "auto": true
87      },
88      {
89        "id": "src",
90        "name": "Source address",
91        "type": "IP_ADDRESS"
92      },
93      {
94        "id": "dst",
95        "name": "Destination address",
96        "type": "IP_ADDRESS"
97      },
98      {
99        "id": "options",
100        "name": "Options",
101        "type": "IP_OPTIONS"
102      }
103    ],
104    "payload": ["TCP", "UDP", "ICMP", "Raw"]
105  },
106  {
107    "id": "TCP",
108    "name": "TCP",
109    "fields": [
110      {
111        "id": "sport",
112        "name": "Source port",
113        "type": "NUMBER",
114        "min": 0,
115        "max": 65535
116        
117      },
118      {
119        "id": "dport",
120        "name": "Destination port",
121        "type": "NUMBER",
122        "min": 0,
123        "max": 65535
124      },
125      {
126        "id": "seq",
127        "name": "Sequence number",
128        "type": "NUMBER"
129      },
130      {
131        "id": "ack",
132        "name": "Acknowledgment number",
133        "type": "NUMBER"
134      },
135      {
136        "id": "dataofs",
137        "name": "Data offset",
138        "type": "NUMBER"
139      },
140      {
141        "id": "reserved",
142        "name": "Reserved",
143        "type": "NUMBER"
144      },
145      {
146        "id": "flags",
147        "name": "Flags",
148        "auto": false,
149        "type": "BITMASK",
150        "bits": [
151          {"name": "URG", "mask": 32, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 32}]},
152          {"name": "ACK", "mask": 16, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 16}]},
153          {"name": "PSH", "mask": 8, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 8}]},
154          {"name": "RST", "mask": 4, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 4}]},
155          {"name": "SYN", "mask": 2, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 2}]},
156          {"name": "FIN", "mask": 1, "values":[{"name":"Not Set", "value": 0}, {"name":"Set", "value": 1}]}
157        ]
158      },
159      {
160        "id": "window",
161        "name": "Window size",
162        "type": "NUMBER"
163      },
164      {
165        "id": "chksum",
166        "name": "Checksum",
167        "auto": true,
168        "type": "NUMBER"
169      },
170      {
171        "id": "urgptr",
172        "name": "Urgent pointer",
173        "type": "NUMBER"
174      },
175      {
176        "id": "options",
177        "name": "Options",
178        "type": "TCP_OPTIONS"
179      }
180    ]
181  },
182  {
183    "id": "Raw",
184    "name": "Raw",
185    "fields": [
186      {
187        "id": "load",
188        "name": "Payload",
189        "type": "BYTES"
190      }
191    ]
192  }
193]
194
195