X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/69cb46af9119e8b5554bcc4bf1bf36f39cb82131..0845bc813c1cc48b18cdefff0b387c110647463c:/print-esp.c diff --git a/print-esp.c b/print-esp.c index 3086928e..fe494a39 100644 --- a/print-esp.c +++ b/print-esp.c @@ -47,9 +47,11 @@ #include "ip6.h" #endif -#include "interface.h" +#include "netdissect.h" #include "extract.h" +#include "ascii_strcasecmp.h" + /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. @@ -331,8 +333,8 @@ espprint_decode_authalgo(netdissect_options *ndo, } *colon = '\0'; - if(strcasecmp(colon,"sha1") == 0 || - strcasecmp(colon,"md5") == 0) { + if(ascii_strcasecmp(colon,"sha1") == 0 || + ascii_strcasecmp(colon,"md5") == 0) { sa->authlen = 12; } return 1; @@ -426,11 +428,11 @@ static void esp_print_decode_onesecret(netdissect_options *ndo, char *line, } else decode = line; - if (spikey && strcasecmp(spikey, "file") == 0) { + if (spikey && ascii_strcasecmp(spikey, "file") == 0) { /* open file and read it */ FILE *secretfile; char fileline[1024]; - int lineno=0; + int subfile_lineno=0; char *nl; char *filename = line; @@ -441,7 +443,7 @@ static void esp_print_decode_onesecret(netdissect_options *ndo, char *line, } while (fgets(fileline, sizeof(fileline)-1, secretfile) != NULL) { - lineno++; + subfile_lineno++; /* remove newline from the line */ nl = strchr(fileline, '\n'); if (nl) @@ -449,14 +451,14 @@ static void esp_print_decode_onesecret(netdissect_options *ndo, char *line, if (fileline[0] == '#') continue; if (fileline[0] == '\0') continue; - esp_print_decode_onesecret(ndo, fileline, filename, lineno); + esp_print_decode_onesecret(ndo, fileline, filename, subfile_lineno); } fclose(secretfile); return; } - if (spikey && strcasecmp(spikey, "ikev2") == 0) { + if (spikey && ascii_strcasecmp(spikey, "ikev2") == 0) { esp_print_decode_ikeline(ndo, line, file, lineno); return; }