This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Is this a bug from function kernel_int?
Hi -
> [...]
> __u32 end_seq; /* SEQ + FIN + SYN + datalen */
>
> So, end_seq is an unsigned 32-bit value, not a signed 32-bit value.
> Strangely enough, we don't have a kernel_uint() function. But, you
> could do something like:
>
> __uint32(*kernel_int(&*@cast($skb->cb, "tcp_skb_cb",
> "kernel<net/tcp.h>")->end_seq))
Chances are you don't need that much machinery.
A
probe SOMEWHERE {
end_seq = @cast($skb->cb, "tcp_skb_cb", "kernel<net/tcp.h>")->end_seq
}
works for me here, though I think the unsignedness of end_seq is not
specifically handled. We should probably treat that as a systemtap bug,
but you can work around it with a
end_seq = end_seq & 0xffffffff
- FChE