From Albert Chin:

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().

svn path=/trunk/; revision=19844
This commit is contained in:
Jaap Keuter 2006-11-07 07:39:16 +00:00
parent faed34492b
commit 5f955a0fcc
4 changed files with 6 additions and 6 deletions

View 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++;

View 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));*/

View 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);

View 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)