[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.20 rfc.ip - IP packets

Module: rfc.ip

This module provides some basic utilities to parse raw IP packets.

The packet argument in the following functions must be any type of uniform vector (See section gauche.uvector - Uniform vectors), containing a raw IP packet including its IP header. Those functions work for both IPv4 and IPv6 packets; however, reading from a raw IPv6 socket returns a packet without IPv6 header, so you usually don't need to use these functions.

Function: ip-version packet

Returns the IP version number (either 4 or 6) of the given IP packet.

Function: ip-header-length packet

Returns the size of IP header of the given packet in octets, including any IP header options.

Function: ip-protocol packet

Returns the IP protocol number of the given packet.

Function: ip-source-address packet
Function: ip-destination-address packet

Returns the source and destination address in the given packet in an integer, respectively.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.