]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tipc.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-tipc.c
index 08a3ea93745803729e08d670fd136cc3f038b8c3..54179a4ea605c6be1785d07d197ffe59c13fbd43 100644 (file)
@@ -23,8 +23,8 @@
 
 /*
  * specification:
- *     http://tipc.sourceforge.net/doc/draft-spec-tipc-07.html
- *     http://tipc.sourceforge.net/doc/tipc_message_formats.html
+ *     https://web.archive.org/web/20150302152944/http://tipc.sourceforge.net/doc/draft-spec-tipc-07.html
+ *     https://web.archive.org/web/20161025110514/http://tipc.sourceforge.net/doc/tipc_message_formats.html
  */
 
 #ifdef HAVE_CONFIG_H
@@ -170,7 +170,6 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap)
        u_int orig_node;
        u_int dest_node;
 
-       ND_TCHECK_4(ap->dest_port);
        w0 = GET_BE_U_4(ap->w0);
        user = TIPC_USER(w0);
        hsize = TIPC_HSIZE(w0);
@@ -189,7 +188,6 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap)
                    tok2str(tipcuser_values, "unknown", user),
                    tok2str(tipcmtype_values, "Unknown", mtype));
        } else {
-               ND_TCHECK_4(ap->dest_node);
                orig_node = GET_BE_U_4(ap->orig_node);
                dest_node = GET_BE_U_4(ap->dest_node);
                ND_PRINT("TIPC v%u.0 %u.%u.%u:%u > %u.%u.%u:%u, headerlength %u bytes, MessageSize %u bytes, %s, messageType %s",
@@ -212,10 +210,6 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap)
                            broadcast_ack, link_ack, link_seq);
                }
        }
-       return;
-
-trunc:
-       nd_print_trunc(ndo);
 }
 
 static void
@@ -240,7 +234,6 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap)
        u_int msg_cnt;
        u_int link_tol;
 
-       ND_TCHECK_4(ap->dest_node);
        w0 = GET_BE_U_4(ap->w0);
        user = TIPC_USER(w0);
        hsize = TIPC_HSIZE(w0);
@@ -258,7 +251,6 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap)
            tok2str(tipcmtype_values, "Unknown", mtype), w1);
 
        if (ndo->ndo_vflag) {
-               ND_TCHECK_SIZE(ap);
                seq_gap = TIPC_SEQ_GAP(w1);
                broadcast_ack = TIPC_BROADCAST_ACK(w1);
                w2 = GET_BE_U_4(ap->w2);
@@ -280,10 +272,6 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap)
                    last_sent_frag, next_sent_frag, trans_seq, msg_cnt,
                    link_tol);
        }
-       return;
-
-trunc:
-       nd_print_trunc(ndo);
 }
 
 static void
@@ -300,7 +288,6 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap)
        u_int ntwrk_id;
        u_int media_id;
 
-       ND_TCHECK_4(ap->prev_node);
        w0 = GET_BE_U_4(ap->w0);
        user = TIPC_USER(w0);
        hsize = TIPC_HSIZE(w0);
@@ -318,7 +305,6 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap)
            tok2str(tipcuser_values, "unknown", user),
            tok2str(tipc_linkconf_mtype_values, "Unknown", mtype));
        if (ndo->ndo_vflag) {
-               ND_TCHECK_4(ap->w5);
                node_sig = TIPC_NODE_SIG(w1);
                ntwrk_id = GET_BE_U_4(ap->ntwrk_id);
                w5 = GET_BE_U_4(ap->w5);
@@ -326,10 +312,6 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap)
                ND_PRINT("\n\tNodeSignature %u, network_id %u, media_id %u",
                    node_sig, ntwrk_id, media_id);
        }
-       return;
-
-trunc:
-       nd_print_trunc(ndo);
 }
 
 void
@@ -342,7 +324,6 @@ tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_,
 
        ndo->ndo_protocol = "tipc";
        ap = (const struct tipc_pkthdr *)bp;
-       ND_TCHECK_4(ap->w0);
        w0 = GET_BE_U_4(ap->w0);
        user = TIPC_USER(w0);
 
@@ -370,8 +351,4 @@ tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_,
                        break;
 
        }
-       return;
-
-trunc:
-       nd_print_trunc(ndo);
 }