udphdr结构包含在/usr/src/linux/include/linux/udp.h

1 struct udphdr {
2        __u16   source;
3        __u16   dest;
4        __u16   len;
5        __u16   check;
6 };

 

     |----------------|----------------|-------------
     |     source     |     dest       |
     |----------------|----------------|
     |     len        |    check   |
     |---------------------------------|

                    UDP头 
udphdr->source
    16位源端口号
udphdr ->dest
    16位目的端口号
udphdr ->len
    表示此次发送的数据报的长度,16位。
udphdr ->check
    校验和。

 

相关文章:

  • 2022-12-23
  • 2021-08-21
  • 2022-01-05
  • 2021-12-26
  • 2022-01-07
  • 2021-10-08
  • 2022-03-09
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案