1 function field_setup(proto
, prefix
)
3 local pf_boolean
= ProtoField
.new("Boolean", prefix
..".boolean", ftypes
.BOOLEAN
)
4 local pf_char
= ProtoField
.new("Char", prefix
..".char", ftypes
.CHAR
)
5 local pf_uint8
= ProtoField
.new("Uint8", prefix
..".uint8", ftypes
.UINT8
)
6 local pf_uint16
= ProtoField
.new("Uint16", prefix
..".uint16", ftypes
.UINT16
)
7 local pf_uint24
= ProtoField
.new("Uint24", prefix
..".uint24", ftypes
.UINT24
)
8 local pf_uint32
= ProtoField
.new("Uint32", prefix
..".uint32", ftypes
.UINT32
)
9 local pf_uint64
= ProtoField
.new("Uint64", prefix
..".uint64", ftypes
.UINT64
)
10 local pf_int8
= ProtoField
.new("Int8", prefix
..".int8", ftypes
.INT8
)
11 local pf_int16
= ProtoField
.new("Int16", prefix
..".int16", ftypes
.INT16
)
12 local pf_int24
= ProtoField
.new("Int24", prefix
..".int24", ftypes
.INT24
)
13 local pf_int32
= ProtoField
.new("Int32", prefix
..".int32", ftypes
.INT32
)
14 local pf_int64
= ProtoField
.new("Int64", prefix
..".int64", ftypes
.INT64
)
15 local pf_float
= ProtoField
.new("Float", prefix
..".float", ftypes
.FLOAT
)
16 local pf_double
= ProtoField
.new("Double", prefix
..".double", ftypes
.DOUBLE
)
17 local pf_absolute_time
= ProtoField
.new("Absolute_Time", prefix
..".absolute_time", ftypes
.ABSOLUTE_TIME
)
18 local pf_relative_time
= ProtoField
.new("Relative_Time", prefix
..".relative_time", ftypes
.RELATIVE_TIME
)
19 local pf_string
= ProtoField
.new("String", prefix
..".string", ftypes
.STRING
)
20 local pf_stringz
= ProtoField
.new("Stringz", prefix
..".stringz", ftypes
.STRINGZ
)
21 local pf_ether
= ProtoField
.new("Ether", prefix
..".ether", ftypes
.ETHER
)
22 local pf_bytes
= ProtoField
.new("Bytes", prefix
..".bytes", ftypes
.BYTES
)
23 local pf_uint_bytes
= ProtoField
.new("Uint_Bytes", prefix
..".uint_bytes", ftypes
.UINT_BYTES
)
24 local pf_ipv4
= ProtoField
.new("Ipv4", prefix
..".ipv4", ftypes
.IPv4
)
25 local pf_ipv6
= ProtoField
.new("Ipv6", prefix
..".ipv6", ftypes
.IPv6
)
26 local pf_ipxnet
= ProtoField
.new("Ipxnet", prefix
..".ipxnet", ftypes
.IPXNET
)
27 local pf_framenum
= ProtoField
.new("Framenum", prefix
..".framenum", ftypes
.FRAMENUM
)
28 local pf_guid
= ProtoField
.new("Guid", prefix
..".guid", ftypes
.GUID
)
29 local pf_oid
= ProtoField
.new("Oid", prefix
..".oid", ftypes
.OID
)
30 local pf_rel_oid
= ProtoField
.new("Rel_Oid", prefix
..".rel_oid", ftypes
.REL_OID
)
31 local pf_system_id
= ProtoField
.new("System_Id", prefix
..".system_id", ftypes
.SYSTEM_ID
)
32 local pf_eui64
= ProtoField
.new("Eui64", prefix
..".eui64", ftypes
.EUI64
)
35 pf_boolean
, pf_char
, pf_uint8
, pf_uint16
, pf_uint24
, pf_uint32
, pf_uint64
, pf_int8
,
36 pf_int16
, pf_int24
, pf_int32
, pf_int64
, pf_float
, pf_double
, pf_absolute_time
, pf_relative_time
,
37 pf_string
, pf_stringz
, pf_ether
, pf_bytes
, pf_uint_bytes
, pf_ipv4
, pf_ipv6
, pf_ipxnet
,
38 pf_framenum
, pf_guid
, pf_oid
, pf_rel_oid
, pf_system_id
, pf_eui64
,
41 local vf_boolean
= Field
.new(prefix
..".boolean")
42 local vf_char
= Field
.new(prefix
..".char")
43 local vf_uint8
= Field
.new(prefix
..".uint8")
44 local vf_uint16
= Field
.new(prefix
..".uint16")
45 local vf_uint24
= Field
.new(prefix
..".uint24")
46 local vf_uint32
= Field
.new(prefix
..".uint32")
47 local vf_uint64
= Field
.new(prefix
..".uint64")
48 local vf_int8
= Field
.new(prefix
..".int8")
49 local vf_int16
= Field
.new(prefix
..".int16")
50 local vf_int24
= Field
.new(prefix
..".int24")
51 local vf_int32
= Field
.new(prefix
..".int32")
52 local vf_int64
= Field
.new(prefix
..".int64")
53 local vf_float
= Field
.new(prefix
..".float")
54 local vf_double
= Field
.new(prefix
..".double")
55 local vf_absolute_time
= Field
.new(prefix
..".absolute_time")
56 local vf_relative_time
= Field
.new(prefix
..".relative_time")
57 local vf_string
= Field
.new(prefix
..".string")
58 local vf_stringz
= Field
.new(prefix
..".stringz")
59 local vf_ether
= Field
.new(prefix
..".ether")
60 local vf_bytes
= Field
.new(prefix
..".bytes")
61 local vf_uint_bytes
= Field
.new(prefix
..".uint_bytes")
62 local vf_ipv4
= Field
.new(prefix
..".ipv4")
63 local vf_ipv6
= Field
.new(prefix
..".ipv6")
64 local vf_ipxnet
= Field
.new(prefix
..".ipxnet")
65 local vf_framenum
= Field
.new(prefix
..".framenum")
66 local vf_guid
= Field
.new(prefix
..".guid")
67 local vf_oid
= Field
.new(prefix
..".oid")
68 local vf_rel_oid
= Field
.new(prefix
..".rel_oid")
69 local vf_system_id
= Field
.new(prefix
..".system_id")
70 local vf_eui64
= Field
.new(prefix
..".eui64")
73 ["boolean"] = {packet_field
= pf_boolean
, value_field
= vf_boolean
},
74 ["char"] = {packet_field
= pf_char
, value_field
= vf_char
},
75 ["uint8"] = {packet_field
= pf_uint8
, value_field
= vf_uint8
},
76 ["uint16"] = {packet_field
= pf_uint16
, value_field
= vf_uint16
},
77 ["uint24"] = {packet_field
= pf_uint24
, value_field
= vf_uint24
},
78 ["uint32"] = {packet_field
= pf_uint32
, value_field
= vf_uint32
},
79 ["uint64"] = {packet_field
= pf_uint64
, value_field
= vf_uint64
},
80 ["int8"] = {packet_field
= pf_int8
, value_field
= vf_int8
},
81 ["int16"] = {packet_field
= pf_int16
, value_field
= vf_int16
},
82 ["int24"] = {packet_field
= pf_int24
, value_field
= vf_int24
},
83 ["int32"] = {packet_field
= pf_int32
, value_field
= vf_int32
},
84 ["int64"] = {packet_field
= pf_int64
, value_field
= vf_int64
},
85 ["float"] = {packet_field
= pf_float
, value_field
= vf_float
},
86 ["double"] = {packet_field
= pf_double
, value_field
= vf_double
},
87 ["absolute_time"] = {packet_field
= pf_absolute_time
, value_field
= vf_absolute_time
},
88 ["relative_time"] = {packet_field
= pf_relative_time
, value_field
= vf_relative_time
},
89 ["string"] = {packet_field
= pf_string
, value_field
= vf_string
},
90 ["stringz"] = {packet_field
= pf_stringz
, value_field
= vf_stringz
},
91 ["ether"] = {packet_field
= pf_ether
, value_field
= vf_ether
},
92 ["bytes"] = {packet_field
= pf_bytes
, value_field
= vf_bytes
},
93 ["uint_bytes"] = {packet_field
= pf_uint_bytes
, value_field
= vf_uint_bytes
},
94 ["ipv4"] = {packet_field
= pf_ipv4
, value_field
= vf_ipv4
},
95 ["ipv6"] = {packet_field
= pf_ipv6
, value_field
= vf_ipv6
},
96 ["ipxnet"] = {packet_field
= pf_ipxnet
, value_field
= vf_ipxnet
},
97 ["framenum"] = {packet_field
= pf_framenum
, value_field
= vf_framenum
},
98 ["guid"] = {packet_field
= pf_guid
, value_field
= vf_guid
},
99 ["oid"] = {packet_field
= pf_oid
, value_field
= vf_oid
},
100 ["rel_oid"] = {packet_field
= pf_rel_oid
, value_field
= vf_rel_oid
},
101 ["system_id"] = {packet_field
= pf_system_id
, value_field
= vf_system_id
},
102 ["eui64"] = {packet_field
= pf_eui64
, value_field
= vf_eui64
},