J-Sim v1.2.1-p7 API

drcl.diffserv
Class DFUtil

java.lang.Object
  extended bydrcl.diffserv.DFUtil
All Implemented Interfaces:
DFConstants

public class DFUtil
extends java.lang.Object
implements DFConstants

This class provides some utility functions for accessing the diffserv code points (DSCP) in the ToS field of a InetPacket.


Field Summary
 
Fields inherited from interface drcl.diffserv.DFConstants
_AF_CLASSES, _SINGLE_RATE, _TWO_RATE, AF11, AF11_TOS, AF12, AF12_TOS, AF13, AF13_TOS, AF1x, AF1x_TOS, AF21, AF21_TOS, AF22, AF22_TOS, AF23, AF23_TOS, AF2x, AF2x_TOS, AF31, AF31_TOS, AF32, AF32_TOS, AF33, AF33_TOS, AF3x, AF3x_TOS, BE, BE_TOS, DFCLASS_MASK, DSCPMask, DSCPShift, EF, EF_TOS, GREEN, IN_PROFILE, MODES, OUT_PROFILE, RED, SINGLE_RATE, TWO_RATE, YELLOW
 
Constructor Summary
DFUtil()
           
 
Method Summary
static java.lang.String classify(InetPacket p_)
          Classifies the packet by the ToS value
static java.lang.String classify(InetPacket p_, int label_)
          Classifies the packet by the ToS value
static java.lang.String classify(long tos_)
          Classifies the packet by the ToS value
static int getDSCP(InetPacket p_)
          Retrieves the DSCP field from the ToS field of the INET packet header.
static java.lang.String printProfileKey(MapKey key_)
          Prints the ToS and mask in the hex form according to the ToS encoding.
static java.lang.String printProfileKeyMask(MapKey key_)
          Prints the mask in the hex form according to the ToS encoding.
static java.lang.String printProfileKeyValue(MapKey key_)
          Prints the ToS value in the hex form according to the ToS encoding.
static void setDSCP(InetPacket p_, long code)
          Sets the DSCP field in the ToS field of the INET packet header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFUtil

public DFUtil()
Method Detail

classify

public static java.lang.String classify(long tos_)
Classifies the packet by the ToS value


classify

public static java.lang.String classify(InetPacket p_)
Classifies the packet by the ToS value


classify

public static java.lang.String classify(InetPacket p_,
                                        int label_)
Classifies the packet by the ToS value


printProfileKeyValue

public static java.lang.String printProfileKeyValue(MapKey key_)
Prints the ToS value in the hex form according to the ToS encoding.


printProfileKeyMask

public static java.lang.String printProfileKeyMask(MapKey key_)
Prints the mask in the hex form according to the ToS encoding.


printProfileKey

public static java.lang.String printProfileKey(MapKey key_)
Prints the ToS and mask in the hex form according to the ToS encoding.


getDSCP

public static int getDSCP(InetPacket p_)
Retrieves the DSCP field from the ToS field of the INET packet header.


setDSCP

public static void setDSCP(InetPacket p_,
                           long code)
Sets the DSCP field in the ToS field of the INET packet header.


J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~