jain.protocol.ip.sip.header
Class HideHeader

java.lang.Object
  |
  +--jain.protocol.ip.sip.header.Header
        |
        +--jain.protocol.ip.sip.header.RequestHeader
              |
              +--jain.protocol.ip.sip.header.HideHeader

public final class HideHeader
extends RequestHeader

This class represents the Hide request header. A client uses the HideHeader to indicate that it wants the path comprised of the ViaHeaders to be hidden from subsequent proxies and user agents. It can take two forms: route HideHeader and hop HideHeader. HideHeaders are typically added by the client user agent, but may be added by any proxy along the path.

If a RequestMessage contains the route HideHeader, all following proxies should hide their previous hop. If a RequestMessage contains the hop HideHeader, only the next proxy should hide the previous hop and then remove the HideHeader unless it also wants to remain anonymous.

A server hides the previous hop by encrypting the host and port of the top-most ViaHeader with an algorithm of its choice. Servers should add additional "salt" to the host and port information prior to encryption to prevent malicious downstream proxies from guessing earlier parts of the path based on seeing identical encrypted ViaHeaders. Hidden ViaHeaders are marked with the hidden ViaHeader option.

A server that is capable of hiding ViaHeaders must attempt to decrypt all ViaHeaders marked as hidden to perform loop detection. Servers that are not capable of hiding can ignore hidden ViaHeaders in their loop detection algorithm.

If hidden ViaHeaders were not marked, a proxy would have to decrypt all ViaHeaders to detect loops, just in case one was encrypted, as the hop HideHeader may have been removed along the way.

A host must not add such a hop HideHeader unless it can guarantee it will only send a RequestMessage for this destination to the same next hop. The reason for this is that it is possible that the RequestMessage will loop back through this same hop from a downstream proxy. he loop will be detected by the next hop if the choice of next hop is fixed, but could loop an arbitrary number of times otherwise.

A client requesting with a route HideHeader can only rely on keeping the RequestMessage path private if it sends the RequestMessage to a trusted proxy. Hiding the route of a SIP RequestMessage is of limited value if the RequestMessage results in data packets being exchanged directly between the calling and called user agent.

The use of HideHeaders is discouraged unless path privacy is truly needed; HideHeaders impose extra processing costs and restrictions for proxies and can cause requests to generate LOOP_DETECTED ResponseMessages that could otherwise be avoided.

Version:
0.6

Field Summary
static java.lang.String token
          Token of HideHeader
 
Fields inherited from class jain.protocol.ip.sip.header.Header
ENTITY_HEADER, GENERAL_HEADER, REQUEST_HEADER, RESPONSE_HEADER
 
Constructor Summary
HideHeader(boolean isRoute)
          Creates a HideHeader which takes boolean value indicating if this HideHeader is for the route
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of HideHeader
 boolean equals(HideHeader hideHeader)
          Indicates whether some other HideHeader is "equal to" this one
 java.lang.String getValue()
          Gets value of HideHeader
 boolean isHop()
          Returns boolean value indicating if this HideHeader is for this hop
 boolean isRoute()
          Returns boolean value indicating if this HideHeader is for the route
 void setHide(boolean isRoute)
          Sets this HideHeader to be for route/hop
 
Methods inherited from class jain.protocol.ip.sip.header.Header
equals, getHeaderType, getToken, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

token

public static final java.lang.String token
Token of HideHeader
Constructor Detail

HideHeader

public HideHeader(boolean isRoute)
Creates a HideHeader which takes boolean value indicating if this HideHeader is for the route
Parameters:
isRoute - boolean value indicating if this HideHeader is for the route
Method Detail

isRoute

public boolean isRoute()
Returns boolean value indicating if this HideHeader is for the route
Returns:
boolean value indicating if this HideHeader is for the route

isHop

public boolean isHop()
Returns boolean value indicating if this HideHeader is for this hop
Returns:
boolean value indicating if this HideHeader is for this hop

setHide

public void setHide(boolean isRoute)
Sets this HideHeader to be for route/hop
Parameters:
isRoute - boolean value indicating if this HideHeader is for the route

getValue

public java.lang.String getValue()
Gets value of HideHeader
Overrides:
getValue in class Header
Returns:
value of HideHeader

clone

public java.lang.Object clone()
Creates and returns a copy of HideHeader
Overrides:
clone in class Header

equals

public boolean equals(HideHeader hideHeader)
Indicates whether some other HideHeader is "equal to" this one
Parameters:
hideHeader - the HideHeader with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems