From 66d492a6c7bb8f9eea386e016b95a0152004bf7c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 14 Jan 2018 16:20:34 +0100 Subject: sys/linux: add vnet descriptions for GRE, MPLS, CAN --- sys/linux/386.go | 117 ++++++++++++++++++++++++++++++++++++------ sys/linux/amd64.go | 117 ++++++++++++++++++++++++++++++++++++------ sys/linux/arm.go | 117 ++++++++++++++++++++++++++++++++++++------ sys/linux/arm64.go | 117 ++++++++++++++++++++++++++++++++++++------ sys/linux/ppc64le.go | 117 ++++++++++++++++++++++++++++++++++++------ sys/linux/socket_can.txt | 7 ++- sys/linux/vnet.txt | 118 ++++++++++++++++++++++++++++++++++++++----- sys/linux/vnet_386.const | 27 ++++++++++ sys/linux/vnet_amd64.const | 27 ++++++++++ sys/linux/vnet_arm.const | 27 ++++++++++ sys/linux/vnet_arm64.const | 27 ++++++++++ sys/linux/vnet_ppc64le.const | 27 ++++++++++ 12 files changed, 754 insertions(+), 91 deletions(-) (limited to 'sys/linux') diff --git a/sys/linux/386.go b/sys/linux/386.go index 2cf0f442b..f900fda1c 100644 --- a/sys/linux/386.go +++ b/sys/linux/386.go @@ -149,7 +149,7 @@ var structDescs_386 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "arp_generic_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arp_generic_packet", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_htypes", FldName: "htype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 19, 23, 24, 27, 32, 256, 257, 258, 259, 260, 264, 270, 271, 272, 280, 512, 513, 513, 516, 517, 518, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 800, 801, 802, 803, 804, 805, 820, 821, 822, 823, 824, 825, 65535, 65534}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "hlen", TypeSize: 1}}, Val: 6}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "plen", TypeSize: 1}}, Buf: "spa"}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_ops", FldName: "op", TypeSize: 2}, BigEndian: true}, Vals: []uint64{1, 2, 3, 4, 8, 9, 10}}, @@ -1075,16 +1075,66 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "data", TypeSize: 8, ArgDir: 1}}}, }}}, {Key: StructKey{Name: "eth2_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet", IsVarlen: true}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, - &UnionType{Key: StructKey{Name: "eth2_payload"}, FldName: "payload"}, + &StructType{Key: StructKey{Name: "eth2_packet_generic"}, FldName: "generic"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, FldName: "arp"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, FldName: "llc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, FldName: "llc_tr"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, FldName: "ipx"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, FldName: "x25"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, FldName: "mpls_uc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, FldName: "mpls_mc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, FldName: "can"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, FldName: "canfd"}, + }}}, + {Key: StructKey{Name: "eth2_packet_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_generic", IsVarlen: true}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, - {Key: StructKey{Name: "eth2_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_payload", IsVarlen: true}, Fields: []Type{ - &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "arp"}, - &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, - &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "ipx"}, - &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "x25"}, - &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, - &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 4}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_ARP, arp_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2054}, + &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CAN, can_frame]", TypeSize: 18}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 12}, + &StructType{Key: StructKey{Name: "can_frame_t[CAN_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CANFD, canfd_frame]", TypeSize: 74}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 13}, + &StructType{Key: StructKey{Name: "can_frame_t[CANFD_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IP, ipv4_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2048}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34525}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPX, ipx_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 33079}, + &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34888}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34887}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 17}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_X25, x25_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2053}, + &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_packet", IsVarlen: true}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr"}, FldName: "dst_mac"}, @@ -1093,7 +1143,7 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "eth_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_payload", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, + &UnionType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, }}}, {Key: StructKey{Name: "ethhdr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ethhdr", TypeSize: 14, ArgDir: 2}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr", Dir: 2}, FldName: "h_dest"}, @@ -1693,6 +1743,24 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}}}, }, AlignAttr: 4}}, + {Key: StructKey{Name: "gre_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "gre_packet_pptp"}, FldName: "pptp"}, + }}}, + {Key: StructKey{Name: "gre_packet_pptp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet_pptp", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "C", TypeSize: 2}, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "R", TypeSize: 2}, BitfieldOff: 1, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "K", TypeSize: 2}, BitfieldOff: 2, BitfieldLen: 1, BitfieldMdl: true}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "S", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "A", TypeSize: 2}, BitfieldOff: 8, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}, BitfieldOff: 9, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 2}, BitfieldOff: 13, BitfieldLen: 3}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "protocol", TypeSize: 2}, BigEndian: true}, Val: 34827}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "payload_len", TypeSize: 2}, BigEndian: true}, BitSize: 8, Buf: "payload"}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "key_call_id", TypeSize: 2}, BigEndian: true}, Kind: 2, RangeEnd: 3}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "add", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, BigEndian: true}}, Kind: 1, RangeEnd: 2}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "group_filter_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "group_filter_in", IsVarlen: true}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "gf_interface", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, @@ -2635,6 +2703,7 @@ var structDescs_386 = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "icmp_packet"}, FldName: "icmp"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, &StructType{Key: StructKey{Name: "igmp_packet"}, FldName: "igmp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, @@ -2856,6 +2925,7 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "udp_packet"}, FldName: "udp"}, &UnionType{Key: StructKey{Name: "icmpv6_packet"}, FldName: "icmpv6"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_routing_ext_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_routing_ext_header", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ipv6_types", FldName: "next_header", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 17, 22, 29, 33, 41, 46, 47, 50, 51, 92, 94, 98, 103, 108, 132, 136, 137, 255, 0, 43, 44, 58, 59, 60, 135, 0, 43, 44, 47, 50, 51, 58, 59, 60, 135}}, @@ -3751,7 +3821,6 @@ var structDescs_386 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "llc_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_packet", IsVarlen: true}, Fields: []Type{ - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, BigEndian: true}, Buf: "payload"}, &UnionType{Key: StructKey{Name: "llc_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "llc_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{ @@ -3767,7 +3836,7 @@ var structDescs_386 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sap_snap_values", FldName: "ssap", TypeSize: 1}}, Vals: []uint64{1, 170}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "control", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "oui", TypeSize: 3}, Kind: 1, RangeBegin: 3, RangeEnd: 3}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "loadlut"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "loadlut", TypeSize: 40}, Fields: []Type{ @@ -3947,6 +4016,22 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "mpls_label"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_label", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "ttl", TypeSize: 4}, BitfieldLen: 8, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "s", TypeSize: 4}, BitfieldOff: 8, BitfieldLen: 1, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "tc", TypeSize: 4}, BitfieldOff: 9, BitfieldLen: 3, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "label", TypeSize: 4}, BitfieldOff: 12, BitfieldLen: 20, BigEndian: true}}, + }}}, + {Key: StructKey{Name: "mpls_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_packet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "labels", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "mpls_label"}}}, + &UnionType{Key: StructKey{Name: "mpls_payload"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "mpls_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_payload", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "generic", IsVarlen: true}}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, + }}}, {Key: StructKey{Name: "mq_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mq_attr", TypeSize: 32}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "flags", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxmsg", TypeSize: 4}}}, @@ -7227,7 +7312,7 @@ var structDescs_386 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "tun_pi"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "tun_pi", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &UnionType{Key: StructKey{Name: "tun_payload"}, FldName: "data"}, }}}, {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{ @@ -16671,6 +16756,7 @@ var consts_386 = []ConstValue{ {Name: "ETH_P_DSA", Value: 27}, {Name: "ETH_P_ECONET", Value: 24}, {Name: "ETH_P_EDSA", Value: 56026}, + {Name: "ETH_P_ERSPAN", Value: 35006}, {Name: "ETH_P_FCOE", Value: 35078}, {Name: "ETH_P_FIP", Value: 35092}, {Name: "ETH_P_HDLC", Value: 25}, @@ -16688,6 +16774,7 @@ var consts_386 = []ConstValue{ {Name: "ETH_P_LOOP", Value: 96}, {Name: "ETH_P_LOOPBACK", Value: 36864}, {Name: "ETH_P_MACSEC", Value: 35045}, + {Name: "ETH_P_MAP", Value: 249}, {Name: "ETH_P_MOBITEX", Value: 21}, {Name: "ETH_P_MPLS_MC", Value: 34888}, {Name: "ETH_P_MPLS_UC", Value: 34887}, @@ -19519,4 +19606,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "e9e7ca1ff914101245963b4987c8329061aaf765" +const revision_386 = "7e81b931f5bc1409b65d9868ec9d70870f6f3df8" diff --git a/sys/linux/amd64.go b/sys/linux/amd64.go index 854234758..800d39849 100644 --- a/sys/linux/amd64.go +++ b/sys/linux/amd64.go @@ -155,7 +155,7 @@ var structDescs_amd64 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "arp_generic_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arp_generic_packet", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_htypes", FldName: "htype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 19, 23, 24, 27, 32, 256, 257, 258, 259, 260, 264, 270, 271, 272, 280, 512, 513, 513, 516, 517, 518, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 800, 801, 802, 803, 804, 805, 820, 821, 822, 823, 824, 825, 65535, 65534}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "hlen", TypeSize: 1}}, Val: 6}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "plen", TypeSize: 1}}, Buf: "spa"}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_ops", FldName: "op", TypeSize: 2}, BigEndian: true}, Vals: []uint64{1, 2, 3, 4, 8, 9, 10}}, @@ -1095,16 +1095,66 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "data", TypeSize: 8, ArgDir: 1}}}, }}}, {Key: StructKey{Name: "eth2_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet", IsVarlen: true}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, - &UnionType{Key: StructKey{Name: "eth2_payload"}, FldName: "payload"}, + &StructType{Key: StructKey{Name: "eth2_packet_generic"}, FldName: "generic"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, FldName: "arp"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, FldName: "llc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, FldName: "llc_tr"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, FldName: "ipx"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, FldName: "x25"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, FldName: "mpls_uc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, FldName: "mpls_mc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, FldName: "can"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, FldName: "canfd"}, + }}}, + {Key: StructKey{Name: "eth2_packet_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_generic", IsVarlen: true}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, - {Key: StructKey{Name: "eth2_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_payload", IsVarlen: true}, Fields: []Type{ - &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "arp"}, - &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, - &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "ipx"}, - &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "x25"}, - &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, - &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 4}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_ARP, arp_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2054}, + &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CAN, can_frame]", TypeSize: 18}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 12}, + &StructType{Key: StructKey{Name: "can_frame_t[CAN_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CANFD, canfd_frame]", TypeSize: 74}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 13}, + &StructType{Key: StructKey{Name: "can_frame_t[CANFD_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IP, ipv4_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2048}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34525}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPX, ipx_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 33079}, + &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34888}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34887}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 17}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_X25, x25_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2053}, + &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_packet", IsVarlen: true}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr"}, FldName: "dst_mac"}, @@ -1113,7 +1163,7 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "eth_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_payload", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, + &UnionType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, }}}, {Key: StructKey{Name: "ethhdr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ethhdr", TypeSize: 14, ArgDir: 2}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr", Dir: 2}, FldName: "h_dest"}, @@ -1715,6 +1765,24 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}}}, }, AlignAttr: 4}}, + {Key: StructKey{Name: "gre_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "gre_packet_pptp"}, FldName: "pptp"}, + }}}, + {Key: StructKey{Name: "gre_packet_pptp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet_pptp", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "C", TypeSize: 2}, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "R", TypeSize: 2}, BitfieldOff: 1, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "K", TypeSize: 2}, BitfieldOff: 2, BitfieldLen: 1, BitfieldMdl: true}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "S", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "A", TypeSize: 2}, BitfieldOff: 8, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}, BitfieldOff: 9, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 2}, BitfieldOff: 13, BitfieldLen: 3}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "protocol", TypeSize: 2}, BigEndian: true}, Val: 34827}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "payload_len", TypeSize: 2}, BigEndian: true}, BitSize: 8, Buf: "payload"}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "key_call_id", TypeSize: 2}, BigEndian: true}, Kind: 2, RangeEnd: 3}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "add", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, BigEndian: true}}, Kind: 1, RangeEnd: 2}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "group_filter_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "group_filter_in", IsVarlen: true}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "gf_interface", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, @@ -2674,6 +2742,7 @@ var structDescs_amd64 = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "icmp_packet"}, FldName: "icmp"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, &StructType{Key: StructKey{Name: "igmp_packet"}, FldName: "igmp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, @@ -2895,6 +2964,7 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "udp_packet"}, FldName: "udp"}, &UnionType{Key: StructKey{Name: "icmpv6_packet"}, FldName: "icmpv6"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_routing_ext_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_routing_ext_header", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ipv6_types", FldName: "next_header", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 17, 22, 29, 33, 41, 46, 47, 50, 51, 92, 94, 98, 103, 108, 132, 136, 137, 255, 0, 43, 44, 58, 59, 60, 135, 0, 43, 44, 47, 50, 51, 58, 59, 60, 135}}, @@ -3790,7 +3860,6 @@ var structDescs_amd64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "llc_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_packet", IsVarlen: true}, Fields: []Type{ - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, BigEndian: true}, Buf: "payload"}, &UnionType{Key: StructKey{Name: "llc_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "llc_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{ @@ -3806,7 +3875,7 @@ var structDescs_amd64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sap_snap_values", FldName: "ssap", TypeSize: 1}}, Vals: []uint64{1, 170}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "control", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "oui", TypeSize: 3}, Kind: 1, RangeBegin: 3, RangeEnd: 3}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "loadlut"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "loadlut", TypeSize: 40}, Fields: []Type{ @@ -3988,6 +4057,22 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "mpls_label"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_label", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "ttl", TypeSize: 4}, BitfieldLen: 8, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "s", TypeSize: 4}, BitfieldOff: 8, BitfieldLen: 1, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "tc", TypeSize: 4}, BitfieldOff: 9, BitfieldLen: 3, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "label", TypeSize: 4}, BitfieldOff: 12, BitfieldLen: 20, BigEndian: true}}, + }}}, + {Key: StructKey{Name: "mpls_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_packet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "labels", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "mpls_label"}}}, + &UnionType{Key: StructKey{Name: "mpls_payload"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "mpls_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_payload", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "generic", IsVarlen: true}}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, + }}}, {Key: StructKey{Name: "mq_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mq_attr", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "flags", TypeSize: 8}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxmsg", TypeSize: 8}}}, @@ -7405,7 +7490,7 @@ var structDescs_amd64 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "tun_pi"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "tun_pi", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &UnionType{Key: StructKey{Name: "tun_payload"}, FldName: "data"}, }}}, {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{ @@ -17124,6 +17209,7 @@ var consts_amd64 = []ConstValue{ {Name: "ETH_P_DSA", Value: 27}, {Name: "ETH_P_ECONET", Value: 24}, {Name: "ETH_P_EDSA", Value: 56026}, + {Name: "ETH_P_ERSPAN", Value: 35006}, {Name: "ETH_P_FCOE", Value: 35078}, {Name: "ETH_P_FIP", Value: 35092}, {Name: "ETH_P_HDLC", Value: 25}, @@ -17141,6 +17227,7 @@ var consts_amd64 = []ConstValue{ {Name: "ETH_P_LOOP", Value: 96}, {Name: "ETH_P_LOOPBACK", Value: 36864}, {Name: "ETH_P_MACSEC", Value: 35045}, + {Name: "ETH_P_MAP", Value: 249}, {Name: "ETH_P_MOBITEX", Value: 21}, {Name: "ETH_P_MPLS_MC", Value: 34888}, {Name: "ETH_P_MPLS_UC", Value: 34887}, @@ -19997,4 +20084,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "0a204a91b3ce2b4c96544cd9cf5a895fe495e216" +const revision_amd64 = "5c5953924e2ddcdd7024d1079b73667ce894d295" diff --git a/sys/linux/arm.go b/sys/linux/arm.go index 0ef5d7b58..c77cfa3db 100644 --- a/sys/linux/arm.go +++ b/sys/linux/arm.go @@ -154,7 +154,7 @@ var structDescs_arm = []*KeyedStruct{ }}}, {Key: StructKey{Name: "arp_generic_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arp_generic_packet", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_htypes", FldName: "htype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 19, 23, 24, 27, 32, 256, 257, 258, 259, 260, 264, 270, 271, 272, 280, 512, 513, 513, 516, 517, 518, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 800, 801, 802, 803, 804, 805, 820, 821, 822, 823, 824, 825, 65535, 65534}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "hlen", TypeSize: 1}}, Val: 6}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "plen", TypeSize: 1}}, Buf: "spa"}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_ops", FldName: "op", TypeSize: 2}, BigEndian: true}, Vals: []uint64{1, 2, 3, 4, 8, 9, 10}}, @@ -1080,16 +1080,66 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "data", TypeSize: 8, ArgDir: 1}}}, }}}, {Key: StructKey{Name: "eth2_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet", IsVarlen: true}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, - &UnionType{Key: StructKey{Name: "eth2_payload"}, FldName: "payload"}, + &StructType{Key: StructKey{Name: "eth2_packet_generic"}, FldName: "generic"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, FldName: "arp"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, FldName: "llc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, FldName: "llc_tr"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, FldName: "ipx"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, FldName: "x25"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, FldName: "mpls_uc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, FldName: "mpls_mc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, FldName: "can"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, FldName: "canfd"}, + }}}, + {Key: StructKey{Name: "eth2_packet_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_generic", IsVarlen: true}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, - {Key: StructKey{Name: "eth2_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_payload", IsVarlen: true}, Fields: []Type{ - &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "arp"}, - &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, - &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "ipx"}, - &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "x25"}, - &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, - &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 4}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_ARP, arp_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2054}, + &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CAN, can_frame]", TypeSize: 18}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 12}, + &StructType{Key: StructKey{Name: "can_frame_t[CAN_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CANFD, canfd_frame]", TypeSize: 74}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 13}, + &StructType{Key: StructKey{Name: "can_frame_t[CANFD_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IP, ipv4_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2048}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34525}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPX, ipx_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 33079}, + &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34888}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34887}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 17}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_X25, x25_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2053}, + &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_packet", IsVarlen: true}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr"}, FldName: "dst_mac"}, @@ -1098,7 +1148,7 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "eth_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_payload", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, + &UnionType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, }}}, {Key: StructKey{Name: "ethhdr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ethhdr", TypeSize: 14, ArgDir: 2}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr", Dir: 2}, FldName: "h_dest"}, @@ -1698,6 +1748,24 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}}}, }, AlignAttr: 4}}, + {Key: StructKey{Name: "gre_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "gre_packet_pptp"}, FldName: "pptp"}, + }}}, + {Key: StructKey{Name: "gre_packet_pptp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet_pptp", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "C", TypeSize: 2}, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "R", TypeSize: 2}, BitfieldOff: 1, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "K", TypeSize: 2}, BitfieldOff: 2, BitfieldLen: 1, BitfieldMdl: true}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "S", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "A", TypeSize: 2}, BitfieldOff: 8, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}, BitfieldOff: 9, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 2}, BitfieldOff: 13, BitfieldLen: 3}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "protocol", TypeSize: 2}, BigEndian: true}, Val: 34827}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "payload_len", TypeSize: 2}, BigEndian: true}, BitSize: 8, Buf: "payload"}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "key_call_id", TypeSize: 2}, BigEndian: true}, Kind: 2, RangeEnd: 3}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "add", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, BigEndian: true}}, Kind: 1, RangeEnd: 2}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "group_filter_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "group_filter_in", IsVarlen: true}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "gf_interface", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, @@ -2652,6 +2720,7 @@ var structDescs_arm = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "icmp_packet"}, FldName: "icmp"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, &StructType{Key: StructKey{Name: "igmp_packet"}, FldName: "igmp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, @@ -2873,6 +2942,7 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "udp_packet"}, FldName: "udp"}, &UnionType{Key: StructKey{Name: "icmpv6_packet"}, FldName: "icmpv6"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_routing_ext_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_routing_ext_header", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ipv6_types", FldName: "next_header", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 17, 22, 29, 33, 41, 46, 47, 50, 51, 92, 94, 98, 103, 108, 132, 136, 137, 255, 0, 43, 44, 58, 59, 60, 135, 0, 43, 44, 47, 50, 51, 58, 59, 60, 135}}, @@ -3573,7 +3643,6 @@ var structDescs_arm = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "llc_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_packet", IsVarlen: true}, Fields: []Type{ - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, BigEndian: true}, Buf: "payload"}, &UnionType{Key: StructKey{Name: "llc_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "llc_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{ @@ -3589,7 +3658,7 @@ var structDescs_arm = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sap_snap_values", FldName: "ssap", TypeSize: 1}}, Vals: []uint64{1, 170}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "control", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "oui", TypeSize: 3}, Kind: 1, RangeBegin: 3, RangeEnd: 3}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "loadlut"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "loadlut", TypeSize: 40}, Fields: []Type{ @@ -3769,6 +3838,22 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "mpls_label"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_label", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "ttl", TypeSize: 4}, BitfieldLen: 8, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "s", TypeSize: 4}, BitfieldOff: 8, BitfieldLen: 1, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "tc", TypeSize: 4}, BitfieldOff: 9, BitfieldLen: 3, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "label", TypeSize: 4}, BitfieldOff: 12, BitfieldLen: 20, BigEndian: true}}, + }}}, + {Key: StructKey{Name: "mpls_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_packet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "labels", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "mpls_label"}}}, + &UnionType{Key: StructKey{Name: "mpls_payload"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "mpls_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_payload", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "generic", IsVarlen: true}}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, + }}}, {Key: StructKey{Name: "mq_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mq_attr", TypeSize: 32}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "flags", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxmsg", TypeSize: 4}}}, @@ -7092,7 +7177,7 @@ var structDescs_arm = []*KeyedStruct{ }}}, {Key: StructKey{Name: "tun_pi"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "tun_pi", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &UnionType{Key: StructKey{Name: "tun_payload"}, FldName: "data"}, }}}, {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{ @@ -16588,6 +16673,7 @@ var consts_arm = []ConstValue{ {Name: "ETH_P_DSA", Value: 27}, {Name: "ETH_P_ECONET", Value: 24}, {Name: "ETH_P_EDSA", Value: 56026}, + {Name: "ETH_P_ERSPAN", Value: 35006}, {Name: "ETH_P_FCOE", Value: 35078}, {Name: "ETH_P_FIP", Value: 35092}, {Name: "ETH_P_HDLC", Value: 25}, @@ -16605,6 +16691,7 @@ var consts_arm = []ConstValue{ {Name: "ETH_P_LOOP", Value: 96}, {Name: "ETH_P_LOOPBACK", Value: 36864}, {Name: "ETH_P_MACSEC", Value: 35045}, + {Name: "ETH_P_MAP", Value: 249}, {Name: "ETH_P_MOBITEX", Value: 21}, {Name: "ETH_P_MPLS_MC", Value: 34888}, {Name: "ETH_P_MPLS_UC", Value: 34887}, @@ -19387,4 +19474,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "c8c8c88f5d5aa6f10f82a6b1ac52983404664571" +const revision_arm = "4d9d147b5f49b65b0eab74e23e9f7265a58b5bd1" diff --git a/sys/linux/arm64.go b/sys/linux/arm64.go index ba21f3dac..cecfebcc9 100644 --- a/sys/linux/arm64.go +++ b/sys/linux/arm64.go @@ -155,7 +155,7 @@ var structDescs_arm64 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "arp_generic_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arp_generic_packet", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_htypes", FldName: "htype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 19, 23, 24, 27, 32, 256, 257, 258, 259, 260, 264, 270, 271, 272, 280, 512, 513, 513, 516, 517, 518, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 800, 801, 802, 803, 804, 805, 820, 821, 822, 823, 824, 825, 65535, 65534}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "hlen", TypeSize: 1}}, Val: 6}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "plen", TypeSize: 1}}, Buf: "spa"}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_ops", FldName: "op", TypeSize: 2}, BigEndian: true}, Vals: []uint64{1, 2, 3, 4, 8, 9, 10}}, @@ -1095,16 +1095,66 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "data", TypeSize: 8, ArgDir: 1}}}, }}}, {Key: StructKey{Name: "eth2_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet", IsVarlen: true}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, - &UnionType{Key: StructKey{Name: "eth2_payload"}, FldName: "payload"}, + &StructType{Key: StructKey{Name: "eth2_packet_generic"}, FldName: "generic"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, FldName: "arp"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, FldName: "llc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, FldName: "llc_tr"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, FldName: "ipx"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, FldName: "x25"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, FldName: "mpls_uc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, FldName: "mpls_mc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, FldName: "can"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, FldName: "canfd"}, + }}}, + {Key: StructKey{Name: "eth2_packet_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_generic", IsVarlen: true}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, - {Key: StructKey{Name: "eth2_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_payload", IsVarlen: true}, Fields: []Type{ - &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "arp"}, - &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, - &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "ipx"}, - &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "x25"}, - &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, - &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 4}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_ARP, arp_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2054}, + &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CAN, can_frame]", TypeSize: 18}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 12}, + &StructType{Key: StructKey{Name: "can_frame_t[CAN_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CANFD, canfd_frame]", TypeSize: 74}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 13}, + &StructType{Key: StructKey{Name: "can_frame_t[CANFD_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IP, ipv4_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2048}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34525}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPX, ipx_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 33079}, + &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34888}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34887}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 17}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_X25, x25_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2053}, + &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_packet", IsVarlen: true}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr"}, FldName: "dst_mac"}, @@ -1113,7 +1163,7 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "eth_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_payload", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, + &UnionType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, }}}, {Key: StructKey{Name: "ethhdr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ethhdr", TypeSize: 14, ArgDir: 2}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr", Dir: 2}, FldName: "h_dest"}, @@ -1715,6 +1765,24 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}}}, }, AlignAttr: 4}}, + {Key: StructKey{Name: "gre_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "gre_packet_pptp"}, FldName: "pptp"}, + }}}, + {Key: StructKey{Name: "gre_packet_pptp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet_pptp", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "C", TypeSize: 2}, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "R", TypeSize: 2}, BitfieldOff: 1, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "K", TypeSize: 2}, BitfieldOff: 2, BitfieldLen: 1, BitfieldMdl: true}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "S", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "A", TypeSize: 2}, BitfieldOff: 8, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}, BitfieldOff: 9, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 2}, BitfieldOff: 13, BitfieldLen: 3}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "protocol", TypeSize: 2}, BigEndian: true}, Val: 34827}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "payload_len", TypeSize: 2}, BigEndian: true}, BitSize: 8, Buf: "payload"}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "key_call_id", TypeSize: 2}, BigEndian: true}, Kind: 2, RangeEnd: 3}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "add", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, BigEndian: true}}, Kind: 1, RangeEnd: 2}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "group_filter_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "group_filter_in", IsVarlen: true}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "gf_interface", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, @@ -2674,6 +2742,7 @@ var structDescs_arm64 = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "icmp_packet"}, FldName: "icmp"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, &StructType{Key: StructKey{Name: "igmp_packet"}, FldName: "igmp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, @@ -2895,6 +2964,7 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "udp_packet"}, FldName: "udp"}, &UnionType{Key: StructKey{Name: "icmpv6_packet"}, FldName: "icmpv6"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_routing_ext_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_routing_ext_header", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ipv6_types", FldName: "next_header", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 17, 22, 29, 33, 41, 46, 47, 50, 51, 92, 94, 98, 103, 108, 132, 136, 137, 255, 0, 43, 44, 58, 59, 60, 135, 0, 43, 44, 47, 50, 51, 58, 59, 60, 135}}, @@ -3595,7 +3665,6 @@ var structDescs_arm64 = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "llc_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_packet", IsVarlen: true}, Fields: []Type{ - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, BigEndian: true}, Buf: "payload"}, &UnionType{Key: StructKey{Name: "llc_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "llc_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{ @@ -3611,7 +3680,7 @@ var structDescs_arm64 = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sap_snap_values", FldName: "ssap", TypeSize: 1}}, Vals: []uint64{1, 170}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "control", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "oui", TypeSize: 3}, Kind: 1, RangeBegin: 3, RangeEnd: 3}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "loadlut"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "loadlut", TypeSize: 40}, Fields: []Type{ @@ -3793,6 +3862,22 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "mpls_label"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_label", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "ttl", TypeSize: 4}, BitfieldLen: 8, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "s", TypeSize: 4}, BitfieldOff: 8, BitfieldLen: 1, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "tc", TypeSize: 4}, BitfieldOff: 9, BitfieldLen: 3, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "label", TypeSize: 4}, BitfieldOff: 12, BitfieldLen: 20, BigEndian: true}}, + }}}, + {Key: StructKey{Name: "mpls_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_packet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "labels", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "mpls_label"}}}, + &UnionType{Key: StructKey{Name: "mpls_payload"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "mpls_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_payload", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "generic", IsVarlen: true}}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, + }}}, {Key: StructKey{Name: "mq_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mq_attr", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "flags", TypeSize: 8}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxmsg", TypeSize: 8}}}, @@ -7206,7 +7291,7 @@ var structDescs_arm64 = []*KeyedStruct{ }}}, {Key: StructKey{Name: "tun_pi"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "tun_pi", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &UnionType{Key: StructKey{Name: "tun_payload"}, FldName: "data"}, }}}, {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{ @@ -16590,6 +16675,7 @@ var consts_arm64 = []ConstValue{ {Name: "ETH_P_DSA", Value: 27}, {Name: "ETH_P_ECONET", Value: 24}, {Name: "ETH_P_EDSA", Value: 56026}, + {Name: "ETH_P_ERSPAN", Value: 35006}, {Name: "ETH_P_FCOE", Value: 35078}, {Name: "ETH_P_FIP", Value: 35092}, {Name: "ETH_P_HDLC", Value: 25}, @@ -16607,6 +16693,7 @@ var consts_arm64 = []ConstValue{ {Name: "ETH_P_LOOP", Value: 96}, {Name: "ETH_P_LOOPBACK", Value: 36864}, {Name: "ETH_P_MACSEC", Value: 35045}, + {Name: "ETH_P_MAP", Value: 249}, {Name: "ETH_P_MOBITEX", Value: 21}, {Name: "ETH_P_MPLS_MC", Value: 34888}, {Name: "ETH_P_MPLS_UC", Value: 34887}, @@ -19379,4 +19466,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "f259ed759dc3399eba55453ea2d2a2b3a81e4e93" +const revision_arm64 = "b2ab40c304c63668bb5614d79255791d6d351692" diff --git a/sys/linux/ppc64le.go b/sys/linux/ppc64le.go index d91199706..1d7d6c6f3 100644 --- a/sys/linux/ppc64le.go +++ b/sys/linux/ppc64le.go @@ -148,7 +148,7 @@ var structDescs_ppc64le = []*KeyedStruct{ }}}, {Key: StructKey{Name: "arp_generic_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "arp_generic_packet", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_htypes", FldName: "htype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 19, 23, 24, 27, 32, 256, 257, 258, 259, 260, 264, 270, 271, 272, 280, 512, 513, 513, 516, 517, 518, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 800, 801, 802, 803, 804, 805, 820, 821, 822, 823, 824, 825, 65535, 65534}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "ptype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "hlen", TypeSize: 1}}, Val: 6}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "plen", TypeSize: 1}}, Buf: "spa"}, &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "arp_ops", FldName: "op", TypeSize: 2}, BigEndian: true}, Vals: []uint64{1, 2, 3, 4, 8, 9, 10}}, @@ -1088,16 +1088,66 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "data", TypeSize: 8, ArgDir: 1}}}, }}}, {Key: StructKey{Name: "eth2_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet", IsVarlen: true}, Fields: []Type{ - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, - &UnionType{Key: StructKey{Name: "eth2_payload"}, FldName: "payload"}, + &StructType{Key: StructKey{Name: "eth2_packet_generic"}, FldName: "generic"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, FldName: "arp"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, FldName: "llc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, FldName: "llc_tr"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, FldName: "ipx"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, FldName: "x25"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, FldName: "mpls_uc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, FldName: "mpls_mc"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, FldName: "can"}, + &StructType{Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, FldName: "canfd"}, + }}}, + {Key: StructKey{Name: "eth2_packet_generic"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_generic", IsVarlen: true}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "etype", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, - {Key: StructKey{Name: "eth2_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_payload", IsVarlen: true}, Fields: []Type{ - &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "arp"}, - &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, - &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "ipx"}, - &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "x25"}, - &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, - &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 4}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_ARP, arp_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_ARP, arp_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2054}, + &UnionType{Key: StructKey{Name: "arp_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CAN, can_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CAN, can_frame]", TypeSize: 18}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 12}, + &StructType{Key: StructKey{Name: "can_frame_t[CAN_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_CANFD, canfd_frame]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_CANFD, canfd_frame]", TypeSize: 74}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 13}, + &StructType{Key: StructKey{Name: "can_frame_t[CANFD_MAX_DLEN]"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IP, ipv4_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IP, ipv4_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2048}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPV6, ipv6_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34525}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_IPX, ipx_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_IPX, ipx_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 33079}, + &StructType{Key: StructKey{Name: "ipx_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_MC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34888}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_MPLS_UC, mpls_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 34887}, + &StructType{Key: StructKey{Name: "mpls_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_TR_802_2, llc_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 17}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "eth2_packet_t[ETH_P_X25, x25_packet]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth2_packet_t[ETH_P_X25, x25_packet]", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "etype", TypeSize: 2}, BigEndian: true}, Val: 2053}, + &StructType{Key: StructKey{Name: "x25_packet"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_packet", IsVarlen: true}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr"}, FldName: "dst_mac"}, @@ -1106,7 +1156,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "eth_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "eth_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "eth_payload", IsVarlen: true}, Fields: []Type{ - &StructType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, + &UnionType{Key: StructKey{Name: "eth2_packet"}, FldName: "eth2"}, }}}, {Key: StructKey{Name: "ethhdr", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ethhdr", TypeSize: 14, ArgDir: 2}, Fields: []Type{ &UnionType{Key: StructKey{Name: "mac_addr", Dir: 2}, FldName: "h_dest"}, @@ -1708,6 +1758,24 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 1}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}}}, }, AlignAttr: 4}}, + {Key: StructKey{Name: "gre_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "gre_packet_pptp"}, FldName: "pptp"}, + }}}, + {Key: StructKey{Name: "gre_packet_pptp"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "gre_packet_pptp", IsVarlen: true}, Fields: []Type{ + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "C", TypeSize: 2}, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "R", TypeSize: 2}, BitfieldOff: 1, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "K", TypeSize: 2}, BitfieldOff: 2, BitfieldLen: 1, BitfieldMdl: true}, Val: 1}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "S", TypeSize: 2}, BitfieldOff: 3, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "A", TypeSize: 2}, BitfieldOff: 8, BitfieldLen: 1, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}, BitfieldOff: 9, BitfieldLen: 4, BitfieldMdl: true}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "version", TypeSize: 2}, BitfieldOff: 13, BitfieldLen: 3}, Val: 1}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "protocol", TypeSize: 2}, BigEndian: true}, Val: 34827}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "payload_len", TypeSize: 2}, BigEndian: true}, BitSize: 8, Buf: "payload"}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "key_call_id", TypeSize: 2}, BigEndian: true}, Kind: 2, RangeEnd: 3}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "add", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, BigEndian: true}}, Kind: 1, RangeEnd: 2}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, + }}}, {Key: StructKey{Name: "group_filter_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "group_filter_in", IsVarlen: true}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "gf_interface", TypeSize: 4}}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, @@ -2654,6 +2722,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &UnionType{Key: StructKey{Name: "icmp_packet"}, FldName: "icmp"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, &StructType{Key: StructKey{Name: "igmp_packet"}, FldName: "igmp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_addr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_addr", TypeSize: 16}, Fields: []Type{ &StructType{Key: StructKey{Name: "ipv6_addr_empty"}, FldName: "empty"}, @@ -2875,6 +2944,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "udp_packet"}, FldName: "udp"}, &UnionType{Key: StructKey{Name: "icmpv6_packet"}, FldName: "icmpv6"}, &StructType{Key: StructKey{Name: "dccp_packet"}, FldName: "dccp"}, + &StructType{Key: StructKey{Name: "gre_packet"}, FldName: "gre"}, }}}, {Key: StructKey{Name: "ipv6_routing_ext_header"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipv6_routing_ext_header", IsVarlen: true}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ipv6_types", FldName: "next_header", TypeSize: 1}}, Vals: []uint64{0, 1, 2, 4, 6, 8, 12, 17, 22, 29, 33, 41, 46, 47, 50, 51, 92, 94, 98, 103, 108, 132, 136, 137, 255, 0, 43, 44, 58, 59, 60, 135, 0, 43, 44, 47, 50, 51, 58, 59, 60, 135}}, @@ -3570,7 +3640,6 @@ var structDescs_ppc64le = []*KeyedStruct{ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "llc_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_packet", IsVarlen: true}, Fields: []Type{ - &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "length", TypeSize: 2}, BigEndian: true}, Buf: "payload"}, &UnionType{Key: StructKey{Name: "llc_payload"}, FldName: "payload"}, }}}, {Key: StructKey{Name: "llc_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "llc_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{ @@ -3586,7 +3655,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sap_snap_values", FldName: "ssap", TypeSize: 1}}, Vals: []uint64{1, 170}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "control", IsVarlen: true}, Kind: 1, RangeBegin: 1, RangeEnd: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "oui", TypeSize: 3}, Kind: 1, RangeBegin: 3, RangeEnd: 3}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "protocol_id", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "payload", IsVarlen: true}}, }}}, {Key: StructKey{Name: "loadlut"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "loadlut", TypeSize: 40}, Fields: []Type{ @@ -3768,6 +3837,22 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}}, }}}, + {Key: StructKey{Name: "mpls_label"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_label", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "ttl", TypeSize: 4}, BitfieldLen: 8, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "s", TypeSize: 4}, BitfieldOff: 8, BitfieldLen: 1, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "tc", TypeSize: 4}, BitfieldOff: 9, BitfieldLen: 3, BigEndian: true, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "label", TypeSize: 4}, BitfieldOff: 12, BitfieldLen: 20, BigEndian: true}}, + }}}, + {Key: StructKey{Name: "mpls_packet"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_packet", IsVarlen: true}, Fields: []Type{ + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "labels", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "mpls_label"}}}, + &UnionType{Key: StructKey{Name: "mpls_payload"}, FldName: "payload"}, + }}}, + {Key: StructKey{Name: "mpls_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mpls_payload", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "generic", IsVarlen: true}}, + &StructType{Key: StructKey{Name: "ipv4_packet"}, FldName: "ipv4"}, + &StructType{Key: StructKey{Name: "ipv6_packet"}, FldName: "ipv6"}, + &StructType{Key: StructKey{Name: "llc_packet"}, FldName: "llc"}, + }}}, {Key: StructKey{Name: "mq_attr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mq_attr", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "flags", TypeSize: 8}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxmsg", TypeSize: 8}}}, @@ -7060,7 +7145,7 @@ var structDescs_ppc64le = []*KeyedStruct{ }}}, {Key: StructKey{Name: "tun_pi"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "tun_pi", IsVarlen: true}, Fields: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "flags", TypeSize: 2}}}, - &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536}}, + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "ether_types", FldName: "proto", TypeSize: 2}, BigEndian: true}, Vals: []uint64{96, 512, 513, 8944, 2048, 2053, 2054, 2560, 2561, 17157, 24576, 24577, 24578, 24579, 24580, 24581, 24582, 24583, 25944, 32821, 32923, 33011, 33024, 35006, 33079, 34525, 34824, 34825, 34878, 34887, 34888, 34892, 34915, 34916, 34924, 34948, 34958, 34978, 34984, 34997, 35018, 35045, 35047, 35061, 35063, 35064, 35067, 35078, 35085, 35092, 35095, 35119, 36864, 37120, 37376, 37632, 56026, 64507, 1536, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 21, 22, 23, 24, 25, 26, 27, 28, 245, 246, 247, 248, 249}}, &UnionType{Key: StructKey{Name: "tun_payload"}, FldName: "data"}, }}}, {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{ @@ -16343,6 +16428,7 @@ var consts_ppc64le = []ConstValue{ {Name: "ETH_P_DSA", Value: 27}, {Name: "ETH_P_ECONET", Value: 24}, {Name: "ETH_P_EDSA", Value: 56026}, + {Name: "ETH_P_ERSPAN", Value: 35006}, {Name: "ETH_P_FCOE", Value: 35078}, {Name: "ETH_P_FIP", Value: 35092}, {Name: "ETH_P_HDLC", Value: 25}, @@ -16360,6 +16446,7 @@ var consts_ppc64le = []ConstValue{ {Name: "ETH_P_LOOP", Value: 96}, {Name: "ETH_P_LOOPBACK", Value: 36864}, {Name: "ETH_P_MACSEC", Value: 35045}, + {Name: "ETH_P_MAP", Value: 249}, {Name: "ETH_P_MOBITEX", Value: 21}, {Name: "ETH_P_MPLS_MC", Value: 34888}, {Name: "ETH_P_MPLS_UC", Value: 34887}, @@ -19124,4 +19211,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "ed550e2055287fd4412f1a4ca2105645c4b70596" +const revision_ppc64le = "4daef52d5935bbfa6bb9f26c4d5ef0648f87c669" diff --git a/sys/linux/socket_can.txt b/sys/linux/socket_can.txt index fdedf7c1e..7b58d7b5e 100644 --- a/sys/linux/socket_can.txt +++ b/sys/linux/socket_can.txt @@ -51,8 +51,8 @@ type msghdr_can[MSG] { } can_raw_msg [ - can can_frame_t[CAN_MAX_DLEN] - canfd can_frame_t[CANFD_MAX_DLEN] + can can_frame + canfd canfd_frame ] [varlen] can_bcm_msg { @@ -75,6 +75,9 @@ type can_frame_t[DATA_SIZE] { data array[int8, DATA_SIZE] } +type can_frame can_frame_t[CAN_MAX_DLEN] +type canfd_frame can_frame_t[CANFD_MAX_DLEN] + canid_t { id int32:29[0:4] err int32:1 diff --git a/sys/linux/vnet.txt b/sys/linux/vnet.txt index 78fb8e0f7..ad8fc49b4 100644 --- a/sys/linux/vnet.txt +++ b/sys/linux/vnet.txt @@ -65,14 +65,14 @@ mac_addr [ ] vlan_tag_ad { - tpid const[0x9100, int16be] + tpid const[ETH_P_QINQ1, int16be] pcp int16:3 dei int16:1 vid int16:12 } [packed] vlan_tag_q { - tpid const[0x8100, int16be] + tpid const[ETH_P_8021Q, int16be] pcp int16:3 dei int16:1 vid int16:12 @@ -100,21 +100,32 @@ eth_payload { # https://en.wikipedia.org/wiki/Ethernet_frame#Ethernet_II -ether_types = ETH_P_LOOP, ETH_P_PUP, ETH_P_PUPAT, ETH_P_TSN, ETH_P_IP, ETH_P_X25, ETH_P_ARP, ETH_P_IEEEPUP, ETH_P_IEEEPUPAT, ETH_P_BATMAN, ETH_P_DEC, ETH_P_DNA_DL, ETH_P_DNA_RC, ETH_P_DNA_RT, ETH_P_LAT, ETH_P_DIAG, ETH_P_CUST, ETH_P_SCA, ETH_P_TEB, ETH_P_RARP, ETH_P_ATALK, ETH_P_AARP, ETH_P_8021Q, ETH_P_IPX, ETH_P_IPV6, ETH_P_PAUSE, ETH_P_SLOW, ETH_P_WCCP, ETH_P_MPLS_UC, ETH_P_MPLS_MC, ETH_P_ATMMPOA, ETH_P_PPP_DISC, ETH_P_PPP_SES, ETH_P_LINK_CTL, ETH_P_ATMFATE, ETH_P_PAE, ETH_P_AOE, ETH_P_8021AD, ETH_P_802_EX1, ETH_P_TIPC, ETH_P_MACSEC, ETH_P_8021AH, ETH_P_MVRP, ETH_P_1588, ETH_P_NCSI, ETH_P_PRP, ETH_P_FCOE, ETH_P_TDLS, ETH_P_FIP, ETH_P_80221, ETH_P_HSR, ETH_P_LOOPBACK, ETH_P_QINQ1, ETH_P_QINQ2, ETH_P_QINQ3, ETH_P_EDSA, ETH_P_AF_IUCV, ETH_P_802_3_MIN +ether_types = ETH_P_LOOP, ETH_P_PUP, ETH_P_PUPAT, ETH_P_TSN, ETH_P_IP, ETH_P_X25, ETH_P_ARP, ETH_P_IEEEPUP, ETH_P_IEEEPUPAT, ETH_P_BATMAN, ETH_P_DEC, ETH_P_DNA_DL, ETH_P_DNA_RC, ETH_P_DNA_RT, ETH_P_LAT, ETH_P_DIAG, ETH_P_CUST, ETH_P_SCA, ETH_P_TEB, ETH_P_RARP, ETH_P_ATALK, ETH_P_AARP, ETH_P_8021Q, ETH_P_ERSPAN, ETH_P_IPX, ETH_P_IPV6, ETH_P_PAUSE, ETH_P_SLOW, ETH_P_WCCP, ETH_P_MPLS_UC, ETH_P_MPLS_MC, ETH_P_ATMMPOA, ETH_P_PPP_DISC, ETH_P_PPP_SES, ETH_P_LINK_CTL, ETH_P_ATMFATE, ETH_P_PAE, ETH_P_AOE, ETH_P_8021AD, ETH_P_802_EX1, ETH_P_TIPC, ETH_P_MACSEC, ETH_P_8021AH, ETH_P_MVRP, ETH_P_1588, ETH_P_NCSI, ETH_P_PRP, ETH_P_FCOE, ETH_P_TDLS, ETH_P_FIP, ETH_P_80221, ETH_P_HSR, ETH_P_LOOPBACK, ETH_P_QINQ1, ETH_P_QINQ2, ETH_P_QINQ3, ETH_P_EDSA, ETH_P_AF_IUCV, ETH_P_802_3_MIN, ETH_P_802_3, ETH_P_AX25, ETH_P_ALL, ETH_P_802_2, ETH_P_SNAP, ETH_P_DDCMP, ETH_P_WAN_PPP, ETH_P_PPP_MP, ETH_P_LOCALTALK, ETH_P_CAN, ETH_P_CANFD, ETH_P_PPPTALK, ETH_P_TR_802_2, ETH_P_MOBITEX, ETH_P_CONTROL, ETH_P_IRDA, ETH_P_ECONET, ETH_P_HDLC, ETH_P_ARCNET, ETH_P_DSA, ETH_P_TRAILER, ETH_P_PHONET, ETH_P_IEEE802154, ETH_P_CAIF, ETH_P_XDSA, ETH_P_MAP + +eth2_packet [ + generic eth2_packet_generic + arp eth2_packet_t[ETH_P_ARP, arp_packet] + ipv4 eth2_packet_t[ETH_P_IP, ipv4_packet] + ipv6 eth2_packet_t[ETH_P_IPV6, ipv6_packet] + llc eth2_packet_t[ETH_P_802_2, llc_packet] + llc_tr eth2_packet_t[ETH_P_TR_802_2, llc_packet] + ipx eth2_packet_t[ETH_P_IPX, ipx_packet] + x25 eth2_packet_t[ETH_P_X25, x25_packet] + mpls_uc eth2_packet_t[ETH_P_MPLS_UC, mpls_packet] + mpls_mc eth2_packet_t[ETH_P_MPLS_MC, mpls_packet] + can eth2_packet_t[ETH_P_CAN, can_frame] + canfd eth2_packet_t[ETH_P_CANFD, canfd_frame] +] [varlen] -eth2_packet { +eth2_packet_generic { etype flags[ether_types, int16be] - payload eth2_payload + payload array[int8] } [packed] -eth2_payload [ - arp arp_packet - llc llc_packet - ipx ipx_packet - x25 x25_packet - ipv4 ipv4_packet - ipv6 ipv6_packet -] [varlen] +type eth2_packet_t[TYPE, PAYLOAD] { + etype const[TYPE, int16be] + payload PAYLOAD +} [packed] ################################################################################ ###################################### ARP ##################################### @@ -206,7 +217,8 @@ llc_payload [ ] [varlen] llc_packet { - length len[payload, int16be] +# TODO: is there length or not? I don't see it in packet format... +# length len[payload, int16be] payload llc_payload } [packed] @@ -655,6 +667,7 @@ ipv4_payload [ icmp icmp_packet dccp dccp_packet igmp igmp_packet + gre gre_packet ] [varlen] ipv6_payload [ @@ -662,6 +675,7 @@ ipv6_payload [ udp udp_packet icmpv6 icmpv6_packet dccp dccp_packet + gre gre_packet ] [varlen] ################################################################################ @@ -801,6 +815,56 @@ udp_packet { data array[int8] } [packed] +################################################################################ +###################################### GRE ##################################### +################################################################################ + +# https://en.wikipedia.org/wiki/Generic_Routing_Encapsulation + +include + +gre_packet { + pptp gre_packet_pptp +# TODO: add more packets +# TODO: this creates recursion ipv4 -> gre -> ipv4 -> ... +# cisco_ipv4 gre_packet_cisco[ETH_P_IP, ipv4_packet] +# cisco_ipv6 gre_packet_cisco[ETH_P_IPV6, ipv6_packet] +} [packed] + +type gre_packet_cisco[PROTO, PAYLOAD] { + C int16:1 + R const[0, int16:1] + K int16:1 + S int16:1 + reserved const[0, int16:9] + version const[0, int16:3] + protocol const[PROTO, int16be] +# checksum, key, sequence number + add array[int16be, 0:3] + payload PAYLOAD +} [packed] + +type pptp_call_id int16be[0:3] + +gre_packet_pptp { + C const[0, int16:1] + R const[0, int16:1] + K const[1, int16:1] + S int16:1 + reserved const[0, int16:4] + A int16:1 + flags const[0, int16:4] + version const[1, int16:3] + protocol const[0x880b, int16be] + payload_len bytesize[payload, int16be] + key_call_id pptp_call_id +# sequence/ack number + add array[int16be, 0:2] + payload ppp_packet +} [packed] + +type ppp_packet array[int8] + ################################################################################ ###################################### ICMP #################################### ################################################################################ @@ -1145,3 +1209,29 @@ igmp_packet { # TODO: describe particular IGMP packets # TODO: open IGMP sockets from userspace + +################################################################################ +###################################### MPLS #################################### +################################################################################ + +# https://en.wikipedia.org/wiki/Multiprotocol_Label_Switching + +mpls_packet { + labels array[mpls_label] + payload mpls_payload +} [packed] + +# TODO: is it this ordering or reverse? +mpls_label { + ttl int32be:8 + s int32be:1 + tc int32be:3 + label int32be:20 +} + +mpls_payload [ + generic array[int8] + ipv4 ipv4_packet + ipv6 ipv6_packet + llc llc_packet +] [varlen] diff --git a/sys/linux/vnet_386.const b/sys/linux/vnet_386.const index d29989958..6a68669ca 100644 --- a/sys/linux/vnet_386.const +++ b/sys/linux/vnet_386.const @@ -93,43 +93,65 @@ ETH_P_8021AD = 34984 ETH_P_8021AH = 35047 ETH_P_8021Q = 33024 ETH_P_80221 = 35095 +ETH_P_802_2 = 4 +ETH_P_802_3 = 1 ETH_P_802_3_MIN = 1536 ETH_P_802_EX1 = 34997 ETH_P_AARP = 33011 ETH_P_AF_IUCV = 64507 +ETH_P_ALL = 3 ETH_P_AOE = 34978 +ETH_P_ARCNET = 26 ETH_P_ARP = 2054 ETH_P_ATALK = 32923 ETH_P_ATMFATE = 34948 ETH_P_ATMMPOA = 34892 +ETH_P_AX25 = 2 ETH_P_BATMAN = 17157 +ETH_P_CAIF = 247 +ETH_P_CAN = 12 +ETH_P_CANFD = 13 +ETH_P_CONTROL = 22 ETH_P_CUST = 24582 +ETH_P_DDCMP = 6 ETH_P_DEC = 24576 ETH_P_DIAG = 24581 ETH_P_DNA_DL = 24577 ETH_P_DNA_RC = 24578 ETH_P_DNA_RT = 24579 +ETH_P_DSA = 27 +ETH_P_ECONET = 24 ETH_P_EDSA = 56026 +ETH_P_ERSPAN = 35006 ETH_P_FCOE = 35078 ETH_P_FIP = 35092 +ETH_P_HDLC = 25 ETH_P_HSR = 35119 +ETH_P_IEEE802154 = 246 ETH_P_IEEEPUP = 2560 ETH_P_IEEEPUPAT = 2561 ETH_P_IP = 2048 ETH_P_IPV6 = 34525 ETH_P_IPX = 33079 +ETH_P_IRDA = 23 ETH_P_LAT = 24580 ETH_P_LINK_CTL = 34924 +ETH_P_LOCALTALK = 9 ETH_P_LOOP = 96 ETH_P_LOOPBACK = 36864 ETH_P_MACSEC = 35045 +ETH_P_MAP = 249 +ETH_P_MOBITEX = 21 ETH_P_MPLS_MC = 34888 ETH_P_MPLS_UC = 34887 ETH_P_MVRP = 35061 ETH_P_NCSI = 35064 ETH_P_PAE = 34958 ETH_P_PAUSE = 34824 +ETH_P_PHONET = 245 +ETH_P_PPPTALK = 16 ETH_P_PPP_DISC = 34915 +ETH_P_PPP_MP = 8 ETH_P_PPP_SES = 34916 ETH_P_PRP = 35067 ETH_P_PUP = 512 @@ -140,12 +162,17 @@ ETH_P_QINQ3 = 37632 ETH_P_RARP = 32821 ETH_P_SCA = 24583 ETH_P_SLOW = 34825 +ETH_P_SNAP = 5 ETH_P_TDLS = 35085 ETH_P_TEB = 25944 ETH_P_TIPC = 35018 +ETH_P_TRAILER = 28 +ETH_P_TR_802_2 = 17 ETH_P_TSN = 8944 +ETH_P_WAN_PPP = 7 ETH_P_WCCP = 34878 ETH_P_X25 = 2053 +ETH_P_XDSA = 248 ICMPV6_ADDR_UNREACH = 3 ICMPV6_ADM_PROHIBITED = 1 ICMPV6_DEST_UNREACH = 1 diff --git a/sys/linux/vnet_amd64.const b/sys/linux/vnet_amd64.const index d29989958..6a68669ca 100644 --- a/sys/linux/vnet_amd64.const +++ b/sys/linux/vnet_amd64.const @@ -93,43 +93,65 @@ ETH_P_8021AD = 34984 ETH_P_8021AH = 35047 ETH_P_8021Q = 33024 ETH_P_80221 = 35095 +ETH_P_802_2 = 4 +ETH_P_802_3 = 1 ETH_P_802_3_MIN = 1536 ETH_P_802_EX1 = 34997 ETH_P_AARP = 33011 ETH_P_AF_IUCV = 64507 +ETH_P_ALL = 3 ETH_P_AOE = 34978 +ETH_P_ARCNET = 26 ETH_P_ARP = 2054 ETH_P_ATALK = 32923 ETH_P_ATMFATE = 34948 ETH_P_ATMMPOA = 34892 +ETH_P_AX25 = 2 ETH_P_BATMAN = 17157 +ETH_P_CAIF = 247 +ETH_P_CAN = 12 +ETH_P_CANFD = 13 +ETH_P_CONTROL = 22 ETH_P_CUST = 24582 +ETH_P_DDCMP = 6 ETH_P_DEC = 24576 ETH_P_DIAG = 24581 ETH_P_DNA_DL = 24577 ETH_P_DNA_RC = 24578 ETH_P_DNA_RT = 24579 +ETH_P_DSA = 27 +ETH_P_ECONET = 24 ETH_P_EDSA = 56026 +ETH_P_ERSPAN = 35006 ETH_P_FCOE = 35078 ETH_P_FIP = 35092 +ETH_P_HDLC = 25 ETH_P_HSR = 35119 +ETH_P_IEEE802154 = 246 ETH_P_IEEEPUP = 2560 ETH_P_IEEEPUPAT = 2561 ETH_P_IP = 2048 ETH_P_IPV6 = 34525 ETH_P_IPX = 33079 +ETH_P_IRDA = 23 ETH_P_LAT = 24580 ETH_P_LINK_CTL = 34924 +ETH_P_LOCALTALK = 9 ETH_P_LOOP = 96 ETH_P_LOOPBACK = 36864 ETH_P_MACSEC = 35045 +ETH_P_MAP = 249 +ETH_P_MOBITEX = 21 ETH_P_MPLS_MC = 34888 ETH_P_MPLS_UC = 34887 ETH_P_MVRP = 35061 ETH_P_NCSI = 35064 ETH_P_PAE = 34958 ETH_P_PAUSE = 34824 +ETH_P_PHONET = 245 +ETH_P_PPPTALK = 16 ETH_P_PPP_DISC = 34915 +ETH_P_PPP_MP = 8 ETH_P_PPP_SES = 34916 ETH_P_PRP = 35067 ETH_P_PUP = 512 @@ -140,12 +162,17 @@ ETH_P_QINQ3 = 37632 ETH_P_RARP = 32821 ETH_P_SCA = 24583 ETH_P_SLOW = 34825 +ETH_P_SNAP = 5 ETH_P_TDLS = 35085 ETH_P_TEB = 25944 ETH_P_TIPC = 35018 +ETH_P_TRAILER = 28 +ETH_P_TR_802_2 = 17 ETH_P_TSN = 8944 +ETH_P_WAN_PPP = 7 ETH_P_WCCP = 34878 ETH_P_X25 = 2053 +ETH_P_XDSA = 248 ICMPV6_ADDR_UNREACH = 3 ICMPV6_ADM_PROHIBITED = 1 ICMPV6_DEST_UNREACH = 1 diff --git a/sys/linux/vnet_arm.const b/sys/linux/vnet_arm.const index d29989958..6a68669ca 100644 --- a/sys/linux/vnet_arm.const +++ b/sys/linux/vnet_arm.const @@ -93,43 +93,65 @@ ETH_P_8021AD = 34984 ETH_P_8021AH = 35047 ETH_P_8021Q = 33024 ETH_P_80221 = 35095 +ETH_P_802_2 = 4 +ETH_P_802_3 = 1 ETH_P_802_3_MIN = 1536 ETH_P_802_EX1 = 34997 ETH_P_AARP = 33011 ETH_P_AF_IUCV = 64507 +ETH_P_ALL = 3 ETH_P_AOE = 34978 +ETH_P_ARCNET = 26 ETH_P_ARP = 2054 ETH_P_ATALK = 32923 ETH_P_ATMFATE = 34948 ETH_P_ATMMPOA = 34892 +ETH_P_AX25 = 2 ETH_P_BATMAN = 17157 +ETH_P_CAIF = 247 +ETH_P_CAN = 12 +ETH_P_CANFD = 13 +ETH_P_CONTROL = 22 ETH_P_CUST = 24582 +ETH_P_DDCMP = 6 ETH_P_DEC = 24576 ETH_P_DIAG = 24581 ETH_P_DNA_DL = 24577 ETH_P_DNA_RC = 24578 ETH_P_DNA_RT = 24579 +ETH_P_DSA = 27 +ETH_P_ECONET = 24 ETH_P_EDSA = 56026 +ETH_P_ERSPAN = 35006 ETH_P_FCOE = 35078 ETH_P_FIP = 35092 +ETH_P_HDLC = 25 ETH_P_HSR = 35119 +ETH_P_IEEE802154 = 246 ETH_P_IEEEPUP = 2560 ETH_P_IEEEPUPAT = 2561 ETH_P_IP = 2048 ETH_P_IPV6 = 34525 ETH_P_IPX = 33079 +ETH_P_IRDA = 23 ETH_P_LAT = 24580 ETH_P_LINK_CTL = 34924 +ETH_P_LOCALTALK = 9 ETH_P_LOOP = 96 ETH_P_LOOPBACK = 36864 ETH_P_MACSEC = 35045 +ETH_P_MAP = 249 +ETH_P_MOBITEX = 21 ETH_P_MPLS_MC = 34888 ETH_P_MPLS_UC = 34887 ETH_P_MVRP = 35061 ETH_P_NCSI = 35064 ETH_P_PAE = 34958 ETH_P_PAUSE = 34824 +ETH_P_PHONET = 245 +ETH_P_PPPTALK = 16 ETH_P_PPP_DISC = 34915 +ETH_P_PPP_MP = 8 ETH_P_PPP_SES = 34916 ETH_P_PRP = 35067 ETH_P_PUP = 512 @@ -140,12 +162,17 @@ ETH_P_QINQ3 = 37632 ETH_P_RARP = 32821 ETH_P_SCA = 24583 ETH_P_SLOW = 34825 +ETH_P_SNAP = 5 ETH_P_TDLS = 35085 ETH_P_TEB = 25944 ETH_P_TIPC = 35018 +ETH_P_TRAILER = 28 +ETH_P_TR_802_2 = 17 ETH_P_TSN = 8944 +ETH_P_WAN_PPP = 7 ETH_P_WCCP = 34878 ETH_P_X25 = 2053 +ETH_P_XDSA = 248 ICMPV6_ADDR_UNREACH = 3 ICMPV6_ADM_PROHIBITED = 1 ICMPV6_DEST_UNREACH = 1 diff --git a/sys/linux/vnet_arm64.const b/sys/linux/vnet_arm64.const index d29989958..6a68669ca 100644 --- a/sys/linux/vnet_arm64.const +++ b/sys/linux/vnet_arm64.const @@ -93,43 +93,65 @@ ETH_P_8021AD = 34984 ETH_P_8021AH = 35047 ETH_P_8021Q = 33024 ETH_P_80221 = 35095 +ETH_P_802_2 = 4 +ETH_P_802_3 = 1 ETH_P_802_3_MIN = 1536 ETH_P_802_EX1 = 34997 ETH_P_AARP = 33011 ETH_P_AF_IUCV = 64507 +ETH_P_ALL = 3 ETH_P_AOE = 34978 +ETH_P_ARCNET = 26 ETH_P_ARP = 2054 ETH_P_ATALK = 32923 ETH_P_ATMFATE = 34948 ETH_P_ATMMPOA = 34892 +ETH_P_AX25 = 2 ETH_P_BATMAN = 17157 +ETH_P_CAIF = 247 +ETH_P_CAN = 12 +ETH_P_CANFD = 13 +ETH_P_CONTROL = 22 ETH_P_CUST = 24582 +ETH_P_DDCMP = 6 ETH_P_DEC = 24576 ETH_P_DIAG = 24581 ETH_P_DNA_DL = 24577 ETH_P_DNA_RC = 24578 ETH_P_DNA_RT = 24579 +ETH_P_DSA = 27 +ETH_P_ECONET = 24 ETH_P_EDSA = 56026 +ETH_P_ERSPAN = 35006 ETH_P_FCOE = 35078 ETH_P_FIP = 35092 +ETH_P_HDLC = 25 ETH_P_HSR = 35119 +ETH_P_IEEE802154 = 246 ETH_P_IEEEPUP = 2560 ETH_P_IEEEPUPAT = 2561 ETH_P_IP = 2048 ETH_P_IPV6 = 34525 ETH_P_IPX = 33079 +ETH_P_IRDA = 23 ETH_P_LAT = 24580 ETH_P_LINK_CTL = 34924 +ETH_P_LOCALTALK = 9 ETH_P_LOOP = 96 ETH_P_LOOPBACK = 36864 ETH_P_MACSEC = 35045 +ETH_P_MAP = 249 +ETH_P_MOBITEX = 21 ETH_P_MPLS_MC = 34888 ETH_P_MPLS_UC = 34887 ETH_P_MVRP = 35061 ETH_P_NCSI = 35064 ETH_P_PAE = 34958 ETH_P_PAUSE = 34824 +ETH_P_PHONET = 245 +ETH_P_PPPTALK = 16 ETH_P_PPP_DISC = 34915 +ETH_P_PPP_MP = 8 ETH_P_PPP_SES = 34916 ETH_P_PRP = 35067 ETH_P_PUP = 512 @@ -140,12 +162,17 @@ ETH_P_QINQ3 = 37632 ETH_P_RARP = 32821 ETH_P_SCA = 24583 ETH_P_SLOW = 34825 +ETH_P_SNAP = 5 ETH_P_TDLS = 35085 ETH_P_TEB = 25944 ETH_P_TIPC = 35018 +ETH_P_TRAILER = 28 +ETH_P_TR_802_2 = 17 ETH_P_TSN = 8944 +ETH_P_WAN_PPP = 7 ETH_P_WCCP = 34878 ETH_P_X25 = 2053 +ETH_P_XDSA = 248 ICMPV6_ADDR_UNREACH = 3 ICMPV6_ADM_PROHIBITED = 1 ICMPV6_DEST_UNREACH = 1 diff --git a/sys/linux/vnet_ppc64le.const b/sys/linux/vnet_ppc64le.const index d29989958..6a68669ca 100644 --- a/sys/linux/vnet_ppc64le.const +++ b/sys/linux/vnet_ppc64le.const @@ -93,43 +93,65 @@ ETH_P_8021AD = 34984 ETH_P_8021AH = 35047 ETH_P_8021Q = 33024 ETH_P_80221 = 35095 +ETH_P_802_2 = 4 +ETH_P_802_3 = 1 ETH_P_802_3_MIN = 1536 ETH_P_802_EX1 = 34997 ETH_P_AARP = 33011 ETH_P_AF_IUCV = 64507 +ETH_P_ALL = 3 ETH_P_AOE = 34978 +ETH_P_ARCNET = 26 ETH_P_ARP = 2054 ETH_P_ATALK = 32923 ETH_P_ATMFATE = 34948 ETH_P_ATMMPOA = 34892 +ETH_P_AX25 = 2 ETH_P_BATMAN = 17157 +ETH_P_CAIF = 247 +ETH_P_CAN = 12 +ETH_P_CANFD = 13 +ETH_P_CONTROL = 22 ETH_P_CUST = 24582 +ETH_P_DDCMP = 6 ETH_P_DEC = 24576 ETH_P_DIAG = 24581 ETH_P_DNA_DL = 24577 ETH_P_DNA_RC = 24578 ETH_P_DNA_RT = 24579 +ETH_P_DSA = 27 +ETH_P_ECONET = 24 ETH_P_EDSA = 56026 +ETH_P_ERSPAN = 35006 ETH_P_FCOE = 35078 ETH_P_FIP = 35092 +ETH_P_HDLC = 25 ETH_P_HSR = 35119 +ETH_P_IEEE802154 = 246 ETH_P_IEEEPUP = 2560 ETH_P_IEEEPUPAT = 2561 ETH_P_IP = 2048 ETH_P_IPV6 = 34525 ETH_P_IPX = 33079 +ETH_P_IRDA = 23 ETH_P_LAT = 24580 ETH_P_LINK_CTL = 34924 +ETH_P_LOCALTALK = 9 ETH_P_LOOP = 96 ETH_P_LOOPBACK = 36864 ETH_P_MACSEC = 35045 +ETH_P_MAP = 249 +ETH_P_MOBITEX = 21 ETH_P_MPLS_MC = 34888 ETH_P_MPLS_UC = 34887 ETH_P_MVRP = 35061 ETH_P_NCSI = 35064 ETH_P_PAE = 34958 ETH_P_PAUSE = 34824 +ETH_P_PHONET = 245 +ETH_P_PPPTALK = 16 ETH_P_PPP_DISC = 34915 +ETH_P_PPP_MP = 8 ETH_P_PPP_SES = 34916 ETH_P_PRP = 35067 ETH_P_PUP = 512 @@ -140,12 +162,17 @@ ETH_P_QINQ3 = 37632 ETH_P_RARP = 32821 ETH_P_SCA = 24583 ETH_P_SLOW = 34825 +ETH_P_SNAP = 5 ETH_P_TDLS = 35085 ETH_P_TEB = 25944 ETH_P_TIPC = 35018 +ETH_P_TRAILER = 28 +ETH_P_TR_802_2 = 17 ETH_P_TSN = 8944 +ETH_P_WAN_PPP = 7 ETH_P_WCCP = 34878 ETH_P_X25 = 2053 +ETH_P_XDSA = 248 ICMPV6_ADDR_UNREACH = 3 ICMPV6_ADM_PROHIBITED = 1 ICMPV6_DEST_UNREACH = 1 -- cgit mrf-deployment