]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lisp.c
NTP: Use tstr for truncation indicator.
[tcpdump] / print-lisp.c
index c6d8809c3d5ea528bc43c5975ba19bf1fb78dcc3..149b1522356f3a264811963e52a25e46b150df67 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/* \summary: - Locator/Identifier Separation Protocol (LISP) printer */
+
 /*
- * netdissect printer for LISP - Locator/Identifier Separation Protocol
- * RFC 6830
+ * specification: RFC 6830
  *
  *
  * The Map-Register message format is:
@@ -98,7 +99,7 @@
 #endif
 
 #include <netdissect-stdinc.h>
-#include <netdissect.h>
+#include "netdissect.h"
 #include <string.h>
 #include <stdlib.h>
 
 #include "addrtoname.h"
 
 static const char tstr[] = " [|LISP]";
-static const char istr[] = " (invalid)";
 
 #define IPv4_AFI                       1
 #define IPv6_AFI                       2
@@ -306,13 +306,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 +339,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: