-static struct lttng_kernel_enum_entry proto_transport_enum_entries[] = {
- [0] = {
- .start = { .value = 0, .signedness = 0, },
- .end = { .value = IPPROTO_ICMP - 1, .signedness = 0, },
- .string = "_unknown",
- },
- [1] = {
- .start = { .value = IPPROTO_ICMP, .signedness = 0, },
- .end = { .value = IPPROTO_ICMP, .signedness = 0, },
- .string = "_icmp",
- },
- [2] = {
- .start = { .value = IPPROTO_ICMP + 1, .signedness = 0, },
- .end = { .value = IPPROTO_TCP - 1, .signedness = 0, },
- .string = "_unknown",
- },
- [3] = {
- .start = { .value = IPPROTO_TCP, .signedness = 0, },
- .end = { .value = IPPROTO_TCP, .signedness = 0, },
- .string = "_tcp",
- },
- [4] = {
- .start = { .value = IPPROTO_TCP + 1, .signedness = 0, },
- .end = { .value = IPPROTO_UDP - 1, .signedness = 0, },
- .string = "_unknown",
- },
- [5] = {
- .start = { .value = IPPROTO_UDP, .signedness = 0, },
- .end = { .value = IPPROTO_UDP, .signedness = 0, },
- .string = "_udp",
- },
- [6] = {
- .start = { .value = IPPROTO_UDP + 1, .signedness = 0, },
- .end = { .value = 255, .signedness = 0, },
- .string = "_unknown",
- },
-};
-
-static const struct lttng_enum_desc proto_transport_header_type = {
- .name = "proto_transport_header_type",
- .entries = proto_transport_enum_entries,
- .nr_entries = ARRAY_SIZE(proto_transport_enum_entries),
-};
-
-static struct lttng_kernel_enum_entry transport_enum_entries[] = {
- [0] = {
- .start = { .value = TH_NONE, .signedness = 0, },
- .end = { .value = TH_NONE, .signedness = 0, },
- .string = "_unknown",
- },
- [1] = {
- .start = { .value = TH_TCP, .signedness = 0, },
- .end = { .value = TH_TCP, .signedness = 0, },
- .string = "_tcp",
- },
- [2] = {
- .start = { .value = TH_UDP, .signedness = 0, },
- .end = { .value = TH_UDP, .signedness = 0, },
- .string = "_udp",
- },
- [3] = {
- .start = { .value = TH_ICMP, .signedness = 0, },
- .end = { .value = TH_ICMP, .signedness = 0, },
- .string = "_icmp",
- },
-};
-
-static const struct lttng_enum_desc transport_header_type = {
- .name = "transport_header_type",
- .entries = transport_enum_entries,
- .nr_entries = ARRAY_SIZE(transport_enum_entries),
-};
-
-/* Structures for network headers. */
-
-static struct lttng_event_field ipv4fields[] = {
- [0] = {
- .name = "version",
- .type = __type_integer(uint8_t, 4, 4, 0,
- __BIG_ENDIAN, 10, none),
- },
- [1] = {
- .name = "ihl",
- .type = __type_integer(uint8_t, 4, 4, 0,
- __BIG_ENDIAN, 10, none),
- },
- [2] = {
- .name = "tos",
- .type = __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
- },
- [3] = {
- .name = "tot_len",
- .type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
- },
- [4] = {
- .name = "id",
- .type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 16, none),
- },
- [5] = {
- .name = "frag_off",
- .type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
- },
- [6] = {
- .name = "ttl",
- .type = __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
- },
- [7] = {
- .name = "protocol",
- .type = {
- .type = lttng_kernel_type_enum_nestable,
- .u.enum_nestable.desc =
- &proto_transport_header_type,
- .u.enum_nestable.container_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, -1,
- __BIG_ENDIAN, 10, none)),
- },
- },
- [8] = {
- .name = "checksum",
- .type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 16, none),
- },
- [9] = {
- .name = "saddr",
- .type = {
- .type = lttng_kernel_type_array_nestable,
- .u.array_nestable.elem_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none)),
- .u.array_nestable.length = 4,
- .u.array_nestable.alignment = lttng_alignof(uint8_t),
- },
- },
- [10] = {
- .name = "daddr",
- .type = {
- .type = lttng_kernel_type_array_nestable,
- .u.array_nestable.elem_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none)),
- .u.array_nestable.length = 4,
- .u.array_nestable.alignment = lttng_alignof(uint8_t),
- },
- },
- [11] = {
- .name = "transport_header_type",
- .type = {
- .type = lttng_kernel_type_enum_nestable,
- .u.enum_nestable.desc = &transport_header_type,
- .u.enum_nestable.container_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, -1,
- __BYTE_ORDER, 10, none)),
- },
- },
- [12] = {
- .name = "transport_header",
- .type = {
- .type = lttng_kernel_type_variant_nestable,
- .u.variant_nestable.tag_name = "transport_header_type",
- .u.variant_nestable.choices = transport_fields,
- .u.variant_nestable.nr_choices = ARRAY_SIZE(transport_fields),
- .u.variant_nestable.alignment = 0,
- },
- },
-};
-
-static struct lttng_event_field ipv6fields[] = {
- [0] = {
- .name = "version",
- .type = __type_integer(uint8_t, 4, 4, 0,
- __BIG_ENDIAN, 10, none),
- },
- [1] = {
- .name = "prio",
- .type = __type_integer(uint8_t, 4, 4, 0,
- __BIG_ENDIAN, 10, none),
- },
- [2] = {
- .name = "flow_lbl",
- .type = {
- .type = lttng_kernel_type_array_nestable,
- .u.array_nestable.elem_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 16, none)),
- .u.array_nestable.length = 3,
- .u.array_nestable.alignment = lttng_alignof(uint8_t),
- },
- },
- [3] = {
- .name = "payload_len",
- .type = __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
- },
- [4] = {
- .name = "nexthdr",
- .type = {
- .type = lttng_kernel_type_enum_nestable,
- .u.enum_nestable.desc =
- &proto_transport_header_type,
- .u.enum_nestable.container_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, -1,
- __BIG_ENDIAN, 10, none)),
- },
- },
- [5] = {
- .name = "hop_limit",
- .type = __type_integer(uint8_t, 0, 0, 0,
- __BIG_ENDIAN, 10, none),
- },
- [6] = {
- .name = "saddr",
- .type = {
- .type = lttng_kernel_type_array_nestable,
- .u.array_nestable.elem_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 16, none)),
- .u.array_nestable.length = 8,
- .u.array_nestable.alignment = lttng_alignof(uint16_t),
- },
- },
- [7] = {
- .name = "daddr",
- .type = {
- .type = lttng_kernel_type_array_nestable,
- .u.array_nestable.elem_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint16_t, 0, 0, 0,
- __BIG_ENDIAN, 16, none)),
- .u.array_nestable.length = 8,
- .u.array_nestable.alignment = lttng_alignof(uint16_t),
- },
- },
- [8] = {
- .name = "transport_header_type",
- .type = {
- .type = lttng_kernel_type_enum_nestable,
- .u.enum_nestable.desc = &transport_header_type,
- .u.enum_nestable.container_type =
- __LTTNG_COMPOUND_LITERAL(struct lttng_type,
- __type_integer(uint8_t, 0, 0, -1,
- __BYTE_ORDER, 10, none)),
- },
- },
- [9] = {
- .name = "transport_header",
- .type = {
- .type = lttng_kernel_type_variant_nestable,
- .u.variant_nestable.tag_name = "transport_header_type",
- .u.variant_nestable.choices = transport_fields,
- .u.variant_nestable.nr_choices = ARRAY_SIZE(transport_fields),
- .u.variant_nestable.alignment = 0,
- },
- },
-};
-
-static struct lttng_event_field network_fields[] = {
- [0] = {
- .name = "unknown",
- .type = {
- .type = lttng_kernel_type_struct_nestable,
- .u.struct_nestable.nr_fields = 0,
- .u.struct_nestable.fields = emptyfields,
- .u.struct_nestable.alignment = 0,
- },
- },
- [1] = {
- .name = "ipv4",
- .type = {
- .type = lttng_kernel_type_struct_nestable,
- .u.struct_nestable.nr_fields = ARRAY_SIZE(ipv4fields),
- .u.struct_nestable.fields = ipv4fields,
- .u.struct_nestable.alignment = 0,
- },
- },
- [2] = {
- .name = "ipv6",
- .type = {
- .type = lttng_kernel_type_struct_nestable,
- .u.struct_nestable.nr_fields = ARRAY_SIZE(ipv6fields),
- .u.struct_nestable.fields = ipv6fields,
- .u.struct_nestable.alignment = 0,
- },
- },
-};
-