MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_ipv6_opt

Function get_ipv6_opt

dpdk/app/test-acl/main.c:1125–1153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1123}
1124
1125static void
1126get_ipv6_opt(const char *opt, const char *name)
1127{
1128 uint32_t i;
1129
1130 static const struct {
1131 const char *name;
1132 uint32_t val;
1133 } ipv6_opt[] = {
1134 {
1135 .name = "4B",
1136 .val = IPV6_FRMT_U32,
1137 },
1138 {
1139 .name = "8B",
1140 .val = IPV6_FRMT_U64,
1141 },
1142 };
1143
1144 for (i = 0; i != RTE_DIM(ipv6_opt); i++) {
1145 if (strcmp(opt, ipv6_opt[i].name) == 0) {
1146 config.ipv6 = ipv6_opt[i].val;
1147 return;
1148 }
1149 }
1150
1151 rte_exit(-EINVAL, "invalid value: \"%s\" for option: %s\n",
1152 opt, name);
1153}
1154
1155
1156static void

Callers 1

get_input_optsFunction · 0.85

Calls 2

strcmpFunction · 0.85
rte_exitFunction · 0.85

Tested by

no test coverage detected