donglaohua1671 2016-07-05 18:19
浏览 203

gopacket层TCP结构ACK与Ack

I am trying to construct TCP packets using the golang libraries gopacket and layers. In layers there is a struct aptly called TCP. There are two ACK fields and I am unsure why there is such a distinction. One is a bool and one is a uint16. What is the purpose for this divergence. Any help is much appreciated.

type TCP struct {
    BaseLayer
    SrcPort, DstPort                           TCPPort
    Seq                                        uint32
    Ack                                        uint32
    DataOffset                                 uint8
    FIN, SYN, RST, PSH, ACK, URG, ECE, CWR, NS bool
    Window                                     uint16
    Checksum                                   uint16
    Urgent                                     uint16

    Options []TCPOption
    Padding []byte
    // contains filtered or unexported fields
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 方程如何编到C语言!
    • ¥20 关于#qt#的问题:Qt代码的移植问题
    • ¥50 求图像处理的matlab方案
    • ¥50 winform中使用edge的Kiosk模式
    • ¥15 关于#python#的问题:功能监听网页
    • ¥15 怎么让wx群机器人发送音乐
    • ¥15 fesafe材料库问题
    • ¥35 beats蓝牙耳机怎么查看日志
    • ¥15 Fluent齿轮搅油
    • ¥15 八爪鱼爬数据为什么自己停了