Hi,

   Here is a segment of code...I did used tvb_get_ntohl();

=============================================
static int ac_user_ip = -1;

guint32         user_ip;        //user ip defined

 tvb_memcpy(tvb, (guint8 *)&iph, offset, sizeof(e_ip));
        iph.ip_len = g_ntohs(iph.ip_len);
        iph.ip_id  = g_ntohs(iph.ip_id);
        iph.ip_off = g_ntohs(iph.ip_off);
        iph.ip_sum = g_ntohs(iph.ip_sum);

 //retrieve the User IP Address from the packet
        user_ip = tvb_get_ntohl(tvb, offset);
        proto_tree_add_ipv4 (ac_tree, ac_user_ip, tvb, offset + 4, -4,
user_ip);

=================================================

tq


Reply via email to