]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use 'u_char *' type for input buffer pointer like in most similar cases
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 2 Jan 2018 18:08:01 +0000 (19:08 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 2 Jan 2018 18:08:01 +0000 (19:08 +0100)
netdissect.h
print-ospf.c
print-udp.c
print-wb.c
smbutil.c

index 47507c318ca9a8d9a2c1f09336e447cbee490869..d23bdbfc266a61de7a2349aa009b0ebec9f5ba2f 100644 (file)
@@ -603,8 +603,8 @@ extern void olsr_print(netdissect_options *, const u_char *, u_int, int);
 extern void openflow_print(netdissect_options *, const u_char *, const u_int);
 extern void ospf6_print(netdissect_options *, const u_char *, u_int);
 extern void ospf_print(netdissect_options *, const u_char *, u_int, const u_char *);
-extern int ospf_print_grace_lsa(netdissect_options *, const uint8_t *, u_int);
-extern int ospf_print_te_lsa(netdissect_options *, const uint8_t *, u_int);
+extern int ospf_print_grace_lsa(netdissect_options *, const u_char *, u_int);
+extern int ospf_print_te_lsa(netdissect_options *, const u_char *, u_int);
 extern void otv_print(netdissect_options *, const u_char *, u_int);
 extern void pgm_print(netdissect_options *, const u_char *, u_int, const u_char *);
 extern void pim_print(netdissect_options *, const u_char *, u_int, const u_char *);
@@ -629,7 +629,7 @@ extern void sctp_print(netdissect_options *, const u_char *, const u_char *, u_i
 extern void sflow_print(netdissect_options *, const u_char *, u_int);
 extern void sip_print(netdissect_options *, const u_char *, u_int);
 extern void slow_print(netdissect_options *, const u_char *, u_int);
-extern void smb_print_data(netdissect_options *, const unsigned char *, int);
+extern void smb_print_data(netdissect_options *, const u_char *, int);
 extern void smb_tcp_print(netdissect_options *, const u_char *, int);
 extern void smtp_print(netdissect_options *, const u_char *, u_int);
 extern int snap_print(netdissect_options *, const u_char *, u_int, u_int, const struct lladdr_info *, const struct lladdr_info *, u_int);
@@ -651,7 +651,7 @@ extern void vrrp_print(netdissect_options *, const u_char *, u_int, const u_char
 extern void vtp_print(netdissect_options *, const u_char *, u_int);
 extern void vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len);
 extern void vxlan_print(netdissect_options *, const u_char *, u_int);
-extern void wb_print(netdissect_options *, const void *, u_int);
+extern void wb_print(netdissect_options *, const u_char *, u_int);
 extern void zephyr_print(netdissect_options *, const u_char *, int);
 extern void zmtp1_print(netdissect_options *, const u_char *, u_int);
 extern void zmtp1_datagram_print(netdissect_options *, const u_char *, const u_int);
index 921bed0cde7f8971e3615268a9d41594cacbce52..91079b0290e1a4f90bad8a124d5f0f7e6fdab179 100644 (file)
@@ -181,7 +181,7 @@ static const struct tok ospf_lls_eo_options[] = {
 
 int
 ospf_print_grace_lsa(netdissect_options *ndo,
-                     const uint8_t *tptr, u_int ls_length)
+                     const u_char *tptr, u_int ls_length)
 {
     u_int tlv_type, tlv_length;
 
@@ -264,7 +264,7 @@ trunc:
 
 int
 ospf_print_te_lsa(netdissect_options *ndo,
-                  const uint8_t *tptr, u_int ls_length)
+                  const u_char *tptr, u_int ls_length)
 {
     u_int tlv_type, tlv_length, subtlv_type, subtlv_length;
     u_int priority_level, te_class, count_srlg;
@@ -852,14 +852,14 @@ ospf_print_lsa(netdissect_options *ndo,
                 break;
 
             case LS_OPAQUE_TYPE_GRACE:
-                if (ospf_print_grace_lsa(ndo, (const uint8_t *)(lsap->lsa_un.un_grace_tlv),
+                if (ospf_print_grace_lsa(ndo, (const u_char *)(lsap->lsa_un.un_grace_tlv),
                                          ls_length) == -1) {
                     return(ls_end);
                 }
                 break;
 
            case LS_OPAQUE_TYPE_TE:
-                if (ospf_print_te_lsa(ndo, (const uint8_t *)(lsap->lsa_un.un_te_lsa_tlv),
+                if (ospf_print_te_lsa(ndo, (const u_char *)(lsap->lsa_un.un_te_lsa_tlv),
                                       ls_length) == -1) {
                     return(ls_end);
                 }
index 69173a69ed41f75ee80cfc9ddfc9c1d5828c8a08..4d2ca422228378c90fe4ef18e61038b169fda9db 100644 (file)
@@ -432,7 +432,7 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
 
                case PT_WB:
                        udpipaddr_print(ndo, ip, sport, dport);
-                       wb_print(ndo, (const void *)(up + 1), length);
+                       wb_print(ndo, (const u_char *)(up + 1), length);
                        break;
 
                case PT_RPC:
@@ -631,7 +631,7 @@ udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
                 * Kludge in test for whiteboard packets.
                 */
                else if (dport == WB_PORT)
-                       wb_print(ndo, (const void *)(up + 1), length);
+                       wb_print(ndo, (const u_char *)(up + 1), length);
                else if (IS_SRC_OR_DST_PORT(CISCO_AUTORP_PORT))
                        cisco_autorp_print(ndo, (const void *)(up + 1), length);
                else if (IS_SRC_OR_DST_PORT(RADIUS_PORT) ||
index 7ff50055e7f7f3a71edfa8baf68d4e5f0dbb53bc..0bbbed71012379af12658945a020c91666eec9d5 100644 (file)
@@ -397,7 +397,7 @@ wb_drawop(netdissect_options *ndo,
  */
 void
 wb_print(netdissect_options *ndo,
-         const void *hdr, u_int len)
+         const u_char *hdr, u_int len)
 {
        const struct pkt_hdr *ph;
        uint8_t type;
index 253721dbe605dab49b467246ccf3ba71a0ba3fef..4969ff0b5dafa727fa7ea6eb7a6b9261df1cdd87 100644 (file)
--- a/smbutil.c
+++ b/smbutil.c
@@ -274,7 +274,7 @@ name_type_str(int name_type)
 }
 
 void
-smb_print_data(netdissect_options *ndo, const unsigned char *buf, int len)
+smb_print_data(netdissect_options *ndo, const u_char *buf, int len)
 {
     int i = 0;