com.ibm.diameter.packet
Class AvpValidatorUtilAddress
java.lang.Object
com.ibm.diameter.packet.AvpValidatorUtilGeneric
com.ibm.diameter.packet.AvpValidatorUtilOctetString
com.ibm.diameter.packet.AvpValidatorUtilAddress
- All Implemented Interfaces:
- AvpValidatorUtil
public class AvpValidatorUtilAddress
- extends AvpValidatorUtilOctetString
Class to validate an AVP of type Address. The Address can be in a variety of formats and the minumum or required
length of the AVP is dependent on the Address Type. However according to RFC 3588, the first 2 octets define the
Address Type and the remainder of the octets contain the address. From that we can declare a minumum length of 10
octets (8 octets for the AVP header and 2 octets for the Address Type).
Field Summary |
static int |
IPv4
An Address Type if IPv4 will have the Address Type octets set to the value 1. |
static int |
IPv6
An Address Type if IPv6 will have the Address Type octets set to the value 2. |
Method Summary |
int |
validate(Avp avp,
boolean vendorSpecific)
Performs validation of the AVP |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IPv4
public static final int IPv4
- An Address Type if IPv4 will have the Address Type octets set to the value 1.
- See Also:
- Constant Field Values
IPv6
public static final int IPv6
- An Address Type if IPv6 will have the Address Type octets set to the value 2.
- See Also:
- Constant Field Values
AvpValidatorUtilAddress
public AvpValidatorUtilAddress()
validate
public int validate(Avp avp,
boolean vendorSpecific)
- Description copied from interface:
AvpValidatorUtil
- Performs validation of the AVP
- Specified by:
validate
in interface AvpValidatorUtil
- Overrides:
validate
in class AvpValidatorUtilOctetString
- Parameters:
avp
- The AVP to be validatedvendorSpecific
- true if this is a Vendor-Specific AVP, otherwise false
- Returns:
- 0 if the Avp passed validation, a non zero return code indicates a problem.
Copyright © 2006 IBM Corp. All Rights Reserved.