libnet_build_tcp() builds a TCP (Transmission Control Protocol) packet. Supplied is the source port, destination port, the sequence and acknowledgement numbers, the control bits (which can be logically OR'd together to set multiple flags -- see the example below), the advertised window size, the urgent pointer, a pointer to an optional data payload, the payload size, and lastly, the pointer to a pre-allocated block of memory for the packet. To just build a TCP header with no data payload, only TCP_H bytes need be allocated.
发布评论
评论(1)
看这里,似乎有一个与tcp相关的函数,所以我猜是的,您可以使用 libnet 注入 tcp 段。
Looking here, there seems to be a function related to tcp, so I guess yes, you can inject tcp segments with libnet.