Lines Matching refs:ndo

82 static void esp_print_addsa(netdissect_options *ndo,
91 (*ndo->ndo_error)(ndo, "ran out of memory to allocate sa structure");
96 ndo->ndo_sa_default = nsa;
98 nsa->next = ndo->ndo_sa_list_head;
99 ndo->ndo_sa_list_head = nsa;
103 static u_int hexdigit(netdissect_options *ndo, char hex)
112 (*ndo->ndo_error)(ndo, "invalid hex digit %c in espsecret\n", hex);
117 static u_int hex2byte(netdissect_options *ndo, char *hexstring)
121 byte = (hexdigit(ndo, hexstring[0]) << 4) + hexdigit(ndo, hexstring[1]);
132 static void esp_print_decode_onesecret(netdissect_options *ndo, char *line)
174 esp_print_decode_onesecret(ndo, fileline);
193 (*ndo->ndo_warning)(ndo, "print_esp: failed to decode spi# %s\n", foo);
215 (*ndo->ndo_warning)(ndo, "print_esp: can not decode IP# %s\n", spikey);
234 (*ndo->ndo_warning)(ndo, "failed to decode espsecret: %s\n", decode);
254 (*ndo->ndo_warning)(ndo, "failed to find cipher algo %s\n", decode);
272 (*ndo->ndo_warning)(ndo, "secret is too big: %d\n", len);
278 espsecret_key[i] = hex2byte(ndo, colon);
298 esp_print_addsa(ndo, &sa1, sa_def);
301 static void esp_print_decodesecret(netdissect_options *ndo)
306 p = ndo->ndo_espsecret;
308 while (ndo->ndo_espsecret && ndo->ndo_espsecret[0] != '\0') {
310 if ((line = strsep(&ndo->ndo_espsecret, "\n,")) == NULL) {
311 line = ndo->ndo_espsecret;
312 ndo->ndo_espsecret = NULL;
315 esp_print_decode_onesecret(ndo, line);
319 static void esp_init(netdissect_options *ndo _U_)
328 esp_print(netdissect_options *ndo,
372 esp_init(ndo);
383 ep = ndo->ndo_snapend;
389 (*ndo->ndo_printf)(ndo, "ESP(spi=0x%08x", EXTRACT_32BITS(&esp->esp_spi));
390 (*ndo->ndo_printf)(ndo, ",seq=0x%x)", EXTRACT_32BITS(&esp->esp_seq));
391 (*ndo->ndo_printf)(ndo, ", length %u", length);
397 if (ndo->ndo_sa_list_head == NULL) {
398 if (!ndo->ndo_espsecret)
401 esp_print_decodesecret(ndo);
404 if (ndo->ndo_sa_list_head == NULL)
419 for (sa = ndo->ndo_sa_list_head; sa != NULL; sa = sa->next) {
437 for (sa = ndo->ndo_sa_list_head; sa != NULL; sa = sa->next) {
454 sa = ndo->ndo_sa_default;
477 (*ndo->ndo_warning)(ndo, "espkey init failed");
498 (ndo->ndo_printf)(ndo, ": ");