From Albert Chin:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 7 Nov 2006 07:39:16 +0000 (07:39 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 7 Nov 2006 07:39:16 +0000 (07:39 +0000)
Patch attached to convert usage of ntohl() -> g_ntohl(). On HP-UX,
ntohl() isn't available unless you -D_XOPEN_SOURCE_EXTENDED but there
are other uses of g_ntohl().

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19844 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-dcom-cba-acco.c
epan/dissectors/packet-dcom.c
epan/dissectors/packet-fcswils.c
gtk/sctp_graph_dlg.c

index 28e0eb66e1e7657049a3ddd8068eedcde6cd6db3..b87340b97672daabd0af165302a0224e799dfd70 100644 (file)
@@ -582,7 +582,7 @@ cba_acco_add(packet_info *pinfo, const char *acco)
         g_free(ip_str);
         return NULL;
     }
-    ip = ntohl(ip);
+    ip = g_ntohl(ip);
 
     pdev = cba_pdev_add(pinfo, (char *) &ip);
     delim++;
index 0050ce540a688affb9852a4b2754e42c2ceb9162..f0ae9a918ded1b078987c3029168540fc336457a 100644 (file)
@@ -1773,7 +1773,7 @@ dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo,
         /* XXX - this conversion is ugly */
         if (inet_aton(szStr, &ipaddr)) {
             if(get_host_ipaddr(szStr, &curr_ip)) {
-                curr_ip = ntohl(curr_ip);
+                curr_ip = g_ntohl(curr_ip);
 
                /*expert_add_info_format(pinfo, NULL, PI_UNDECODED, PI_WARN, "DUALSTRINGARRAY: IP:%s", 
                     ip_to_str( (gchar *) &curr_ip));*/
index 48c0695be53b9da49fcdf0921fe2d2230ae49d2a..ca776c95be934a3ebfc34d0f4d3f83e26219c2a2 100644 (file)
@@ -722,8 +722,8 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
     /* We skip the initial 4 bytes as we don't care about the opcode */
     tvb_memcpy (tvb, (guint8 *)&elp, 4, FC_SWILS_ELP_SIZE);
     
-    elp.r_a_tov = ntohl (elp.r_a_tov);
-    elp.e_d_tov = ntohl (elp.e_d_tov);
+    elp.r_a_tov = g_ntohl (elp.r_a_tov);
+    elp.e_d_tov = g_ntohl (elp.e_d_tov);
     elp.isl_flwctrl_mode = ntohs (elp.isl_flwctrl_mode);
     elp.flw_ctrl_parmlen = ntohs (elp.flw_ctrl_parmlen);
     
index 27d0c040833b25521faedfe02d306acd422eb51d..698d116012785f566fa12d4094587aa9578687a3 100644 (file)
@@ -199,7 +199,7 @@ static void draw_sack_graph(struct sctp_udata *u_data)
                        {
                                sack_header =(struct sack_chunk_header *)tlist->data;
                                nr=ntohs(sack_header->nr_of_gaps);
-                               tsnumber = ntohl(sack_header->cum_tsn_ack);
+                               tsnumber = g_ntohl(sack_header->cum_tsn_ack);
 
                                if (sack->secs>=u_data->io->x1_tmp_sec)
                                {
@@ -310,7 +310,7 @@ static void draw_tsn_graph(struct sctp_udata *u_data)
                {
                        type = ((struct chunk_header *)tlist->data)->type;
                        if (type == SCTP_DATA_CHUNK_ID)
-                               tsnumber = ntohl(((struct data_chunk_header *)tlist->data)->tsn);
+                               tsnumber = g_ntohl(((struct data_chunk_header *)tlist->data)->tsn);
                        if (tsnumber>=min_tsn && tsnumber<=max_tsn && tsn->secs>=min_secs)
                        {
                                        if (u_data->io->uoff)