ipv4

package
v0.0.0-...-a450568 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags uint8

type Packet

type Packet struct {
	Version  uint8    // 版本号字段(4 bits)
	IHL      uint8    // 报头长度字段 (4 bits)
	TOS      uint8    `cmp:"skip"` //服务类型字段(8 bits)
	Length   uint16   `cmp:"skip"` //总长度字段(16 bits)
	ID       uint16   //标识字段(16 bits)
	Flags    Flags    //标志字段(3 bits)
	FragOff  uint16   //段偏移字段(16 bits)
	TTL      uint8    `cmp:"skip"`              //生存期字段(8 bits)
	Protocol Protocol `string:"proto"`          //协议字段(8 bits)
	Checksum uint16   `cmp:"skip" string:"sum"` //头部校验和字段(16 bits)
	SrcAddr  net.IP   `string:"src"`            //源地址字段
	DstAddr  net.IP   `string:"dst"`            //目标地址字段
	// contains filtered or unexported fields
}

type Protocol

type Protocol uint8

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL