ipv4

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ipv4 contains the implementation of the ipv4 network protocol. To use it in the networking stack, this package must be added to the project, and activated on the stack by passing ipv4.NewProtocol() as one of the network protocols when calling stack.New(). Then endpoints can be created by passing ipv4.ProtocolNumber as the network protocol number when calling Stack.NewEndpoint().

Index

Constants

View Source
const (
	// ProtocolNumber is the ipv4 protocol number.
	ProtocolNumber = header.IPv4ProtocolNumber

	// MaxTotalSize is maximum size that can be encoded in the 16-bit
	// TotalLength field of the ipv4 header.
	MaxTotalSize = 0xffff

	// DefaultTTL is the default time-to-live value for this endpoint.
	DefaultTTL = 64
)

Variables

This section is empty.

Functions

func NewProtocol

func NewProtocol() stack.NetworkProtocol

NewProtocol returns an IPv4 network protocol.

Types

This section is empty.

Jump to

Keyboard shortcuts

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