JNodeOS v1.2.0 API

edu.utah.janos.util
Interface PacketSegment

All Known Implementing Classes:
PaddingPacketSegment, PlainPacketSegment, IPHeader, ICMPHeader, UDPHeader

public interface PacketSegment

A PacketSegment is a simple interface for marshalling/unmarshalling segments of a larger packet.


Method Summary
 int getLength()
           
 int marshal(BufferHandle bh, int offset)
           
 int unmarshal(BufferHandle bh, int offset)
           
 

Method Detail

getLength

public int getLength()
Returns:
The length of this packet segment.

marshal

public int marshal(BufferHandle bh,
                   int offset)
Parameters:
bh - The buffer to marshal this packet into.
offset - The offset in the buffer to start marshalling.

unmarshal

public int unmarshal(BufferHandle bh,
                     int offset)
              throws InvalidPacketException
Parameters:
bh - The buffer that contains the marshalled packet segments.
offset - The offset in the buffer to start unmarshalling.

JNodeOS v1.2.0 API

This documentation is Copyright (C) 1998-2002 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project web site: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002