Hi,

I am trying my hand with the fbt provider and need some help in the explaining my observation results.

------------------------------------------------
#!/usr/sbin/dtrace -s

fbt::ill_input_short_v4:entry
{
        ip = (ipha_t *)args[1];
        printf("%u\n",(ip->ipha_src));
}
-------------------------------------------------

Running the script generates lines upon lines of :
dtrace: error on enabled probe ID 1 (ID 44145: fbt:ip:ill_input_short_v4:entry): invalid alignment (0xffffff014a8ec90e) in action #2 at DIF offset 12

However,no error is observed when I replace ipha_src with any of the first 8 members of ipha_s (ip_version_and_hdr_length to ipha_hdr_checksum)

-------------------------------------------------

From mdb -k

> ::print -t ipha_t
ipha_t {
    uint8_t ipha_version_and_hdr_length
    uint8_t ipha_type_of_service
    uint16_t ipha_length
    uint16_t ipha_ident
    uint16_t ipha_fragment_offset_and_flags
    uint8_t ipha_ttl
    uint8_t ipha_protocol
    uint16_t ipha_hdr_checksum
    ipaddr_t ipha_src
    ipaddr_t ipha_dst
}
>

From source,

#define _IPADDR_T
typedef uint32_t ipaddr_t;
#endif

Running sizeof(ipha_t) gives 20, which I think checks out at (8+8+16+16+16+8+8+16+32+32)/8
-------------------------------------------------------------

Any ideas to get ipha_src print out properly ?

Many thanks,
Wei Liam













_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to