Skip to content

Commit

Permalink
Internal change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 220314735
  • Loading branch information
Googler authored and shentubot committed Nov 6, 2018
1 parent f93cf6d commit 6223112
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tcpip/header/ipv4.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6223112

Please sign in to comment.