From: Francois-Xavier Le Bail Date: Sun, 8 Mar 2020 12:28:17 +0000 (+0100) Subject: ESP: Rename two printers X-Git-Tag: tcpdump-4.99-bp~484 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/8c88f9f54a37bd257471d72d78fc7e211113495d ESP: Rename two printers Rename esp_print_decodesecret() to esp_decodesecret_print() and esp_print_decrypt_buffer_by_ikev2() to esp_decrypt_buffer_by_ikev2_print() with _print suffix like in most similar cases. --- diff --git a/netdissect.h b/netdissect.h index 620c9a11..01cc60bb 100644 --- a/netdissect.h +++ b/netdissect.h @@ -740,8 +740,8 @@ extern const char *dnnum_string(netdissect_options *, u_short); extern int decode_prefix4(netdissect_options *, const u_char *, u_int, char *, size_t); extern int decode_prefix6(netdissect_options *, const u_char *, u_int, char *, size_t); -extern void esp_print_decodesecret(netdissect_options *); -extern int esp_print_decrypt_buffer_by_ikev2(netdissect_options *, int, +extern void esp_decodesecret_print(netdissect_options *); +extern int esp_decrypt_buffer_by_ikev2_print(netdissect_options *, int, const u_char spii[8], const u_char spir[8], const u_char *, const u_char *); diff --git a/print-esp.c b/print-esp.c index 91d394ff..0b3ecc91 100644 --- a/print-esp.c +++ b/print-esp.c @@ -277,7 +277,7 @@ do_decrypt(netdissect_options *ndo, const char *caller, struct sa_list *sa, * anything in the old buffer. That will free the new buffer. */ USES_APPLE_DEPRECATED_API -int esp_print_decrypt_buffer_by_ikev2(netdissect_options *ndo, +int esp_decrypt_buffer_by_ikev2_print(netdissect_options *ndo, int initiator, const u_char spii[8], const u_char spir[8], @@ -315,7 +315,7 @@ int esp_print_decrypt_buffer_by_ikev2(netdissect_options *ndo, if(end <= ct) return 0; - pt = do_decrypt(ndo, "esp_print_decrypt_buffer_by_ikev2", sa, iv, + pt = do_decrypt(ndo, "esp_decrypt_buffer_by_ikev2_print", sa, iv, ct, ctlen); if (pt == NULL) return 0; @@ -683,7 +683,7 @@ static void esp_init(netdissect_options *ndo _U_) } USES_APPLE_RST -void esp_print_decodesecret(netdissect_options *ndo) +void esp_decodesecret_print(netdissect_options *ndo) { char *line; char *p; @@ -763,7 +763,7 @@ esp_print(netdissect_options *ndo, if (!ndo->ndo_espsecret) return; - esp_print_decodesecret(ndo); + esp_decodesecret_print(ndo); } if (ndo->ndo_sa_list_head == NULL) diff --git a/print-isakmp.c b/print-isakmp.c index 21ca9027..b3854d15 100644 --- a/print-isakmp.c +++ b/print-isakmp.c @@ -2689,7 +2689,7 @@ ikev2_e_print(netdissect_options *ndo, np = GET_U_1(ext->np); /* try to decrypt it! */ - if(esp_print_decrypt_buffer_by_ikev2(ndo, + if(esp_decrypt_buffer_by_ikev2_print(ndo, GET_U_1(base->flags) & ISAKMP_FLAG_I, base->i_ck, base->r_ck, dat, dat+dlen)) { @@ -2701,7 +2701,7 @@ ikev2_e_print(netdissect_options *ndo, ndo->ndo_snapend, phase, doi, proto, depth+1); /* - * esp_print_decrypt_buffer_by_ikev2 pushed information + * esp_decrypt_buffer_by_ikev2_print pushed information * on the buffer stack; we're done with the buffer, so * pop it (which frees the buffer) */ @@ -3059,7 +3059,7 @@ isakmp_print(netdissect_options *ndo, /* initialize SAs */ if (ndo->ndo_sa_list_head == NULL) { if (ndo->ndo_espsecret) - esp_print_decodesecret(ndo); + esp_decodesecret_print(ndo); } #endif