mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Internal change.
PiperOrigin-RevId: 220314735 Change-Id: Ic519567e43f6caf042b9f223e517da40640b7d38
This commit is contained in:
@@ -211,6 +211,11 @@ func (b IPv4) SetFlagsFragmentOffset(flags uint8, offset uint16) {
|
||||
binary.BigEndian.PutUint16(b[flagsFO:], v)
|
||||
}
|
||||
|
||||
// SetID sets the identification field.
|
||||
func (b IPv4) SetID(v uint16) {
|
||||
binary.BigEndian.PutUint16(b[id:], v)
|
||||
}
|
||||
|
||||
// SetSourceAddress sets the "source address" field of the ipv4 header.
|
||||
func (b IPv4) SetSourceAddress(addr tcpip.Address) {
|
||||
copy(b[srcAddr:srcAddr+IPv4AddressSize], addr)
|
||||
|
||||
Reference in New Issue
Block a user