]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lisp.c
call ipaddr_string() instead of getname()
[tcpdump] / print-lisp.c
index c6d8809c3d5ea528bc43c5975ba19bf1fb78dcc3..e9a2bc136df83de043a84d8aaecd8561395ec79c 100644 (file)
 #include "addrtoname.h"
 
 static const char tstr[] = " [|LISP]";
-static const char istr[] = " (invalid)";
 
 #define IPv4_AFI                       1
 #define IPv6_AFI                       2
@@ -306,13 +305,13 @@ void lisp_print(netdissect_options *ndo, const u_char *bp, u_int length)
                switch (eid_afi) {
                case IPv4_AFI:
                        ND_TCHECK2(*(packet_iterator + packet_offset), 4);
-                       ND_PRINT((ndo, " EID %s/%u,", getname(ndo,
+                       ND_PRINT((ndo, " EID %s/%u,", ipaddr_string(ndo,
                                packet_iterator + packet_offset), mask_len));
                        packet_offset += 4;
                        break;
                case IPv6_AFI:
                        ND_TCHECK2(*(packet_iterator + packet_offset), 16);
-                       ND_PRINT((ndo, " EID %s/%u,", getname6(ndo,
+                       ND_PRINT((ndo, " EID %s/%u,", ip6addr_string(ndo,
                                packet_iterator + packet_offset), mask_len));
                        packet_offset += 16;
                        break;
@@ -339,12 +338,12 @@ void lisp_print(netdissect_options *ndo, const u_char *bp, u_int length)
                        switch (loc_afi) {
                        case IPv4_AFI:
                                ND_TCHECK2(*(packet_iterator + packet_offset), 4);
-                               ND_PRINT((ndo, " LOC %s", getname(ndo, loc_ip_pointer)));
+                               ND_PRINT((ndo, " LOC %s", ipaddr_string(ndo, loc_ip_pointer)));
                                packet_offset += 4;
                                break;
                        case IPv6_AFI:
                                ND_TCHECK2(*(packet_iterator + packet_offset), 16);
-                               ND_PRINT((ndo, " LOC %s", getname6(ndo, loc_ip_pointer)));
+                               ND_PRINT((ndo, " LOC %s", ip6addr_string(ndo, loc_ip_pointer)));
                                packet_offset += 16;
                                break;
                        default: