Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions

Internet Protocol Version 4. More...

Functions

syscall dot2ipv4 (const char *str, struct netaddr *ip)
 
syscall ipv4Recv (struct packet *pkt)
 
syscall ipv4Send (struct packet *pkt, struct netaddr *src, struct netaddr *dst, uchar proto)
 

Detailed Description

Internet Protocol Version 4.

Function Documentation

syscall dot2ipv4 ( const char *  str,
struct netaddr *  ip 
)

Convert an IPv4 address in dotted-decimal notation into a netaddr.

Parameters
strThe dotted-decimal IPv4 address string to convert.
ipThe netaddr structure for conversion result.
Returns
::OK if conversion was successful, otherwise ::SYSERR.
syscall ipv4Recv ( struct packet *  pkt)

Process an incoming IPv4 packet.

Parameters
pktpointer to the incoming packet
Returns
OK if packet was processed succesfully, otherwise SYSERR
syscall ipv4Send ( struct packet *  pkt,
struct netaddr *  src,
struct netaddr *  dst,
uchar  proto 
)

file ipv4Send.c

Send an outgoing IPv4 packet.

Parameters
packetpacket being sent
srcsource IP address
dstdestination IP address
protothe protocol of the ip pkt
Returns
OK if packet was sent, TIMEOUT if ARP request timed out, IPv4_NO_INTERFACE if interface does not exist, IPv4_NO_HOP if next hop is unknown, SYSERR otherwise.