Exemple #1
0
func (i IPv4_P) Id() uint16 {
	return inet.NToHS(i[4:6])
}
Exemple #2
0
func (i IPv4_P) Length() uint16 {
	return inet.NToHS(i[2:4])
}
Exemple #3
0
func (i IPv4_P) Checksum() uint16 {
	return inet.NToHS(i[10:12])
}
Exemple #4
0
func (i IPv4_P) FragmentOffset() uint16 {
	return inet.NToHS([]byte{i[6] & 0x1f, i[7]})
}
Exemple #5
0
func (a ARP_P) Operation() ARPOperation {
	return ARPOperation(inet.NToHS(a[6:8]))
}
Exemple #6
0
func (a ARP_P) HardwareType() uint16 {
	return inet.NToHS(a[0:2])
}