Package org.sblim.slp.internal
Class IPv6MulticastAddressFactory
- java.lang.Object
-
- org.sblim.slp.internal.IPv6MulticastAddressFactory
-
public class IPv6MulticastAddressFactory extends java.lang.ObjectSVRLOC group-id : FF0X:0:0:0:0:0:0:116 - SRVTYPERQST Service Type Request - ATTRRQST Attribute Request - UA sends too SVRLOC-DA group-id : FF0X:0:0:0:0:0:0:123 - SRVRQST for the "service:directory-agent" service type - UA sends too 1000 - 13FF: SRVRQST : FF0X:0:0:0:0:0:1:.... - the ID is the hashcode of the Service Type string used in the SrvRqst. - UA sends too
-
-
Constructor Summary
Constructors Constructor Description IPv6MulticastAddressFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.net.InetAddressget(int pScope, int pSrvHash)getstatic java.net.InetAddressget(int pScope, SLPMessage pMsg)getstatic java.net.InetAddressget(int pScope, ServiceType pSrvType)getstatic java.net.InetAddressgetSrvLocAddress(int pScope)getSrvLocAddressstatic intgetSrvTypeHash(ServiceType pServiceType)unsigned long slp_hash(const char *pc, unsigned int len) { unsigned long h = 0; while (len-- != 0) { h *= 33; h += *pc++; } return (0x3FF & h); // round to a range of 0-1023 }
-
-
-
Method Detail
-
getSrvLocAddress
public static java.net.InetAddress getSrvLocAddress(int pScope) throws java.net.UnknownHostExceptiongetSrvLocAddress- Parameters:
pScope-- Returns:
- InetAddress
- Throws:
java.net.UnknownHostException
-
get
public static java.net.InetAddress get(int pScope, SLPMessage pMsg) throws java.net.UnknownHostExceptionget- Parameters:
pScope-pMsg-- Returns:
- InetAddress
- Throws:
java.net.UnknownHostException
-
get
public static java.net.InetAddress get(int pScope, ServiceType pSrvType) throws java.net.UnknownHostExceptionget- Parameters:
pScope-pSrvType-- Returns:
- InetAddress
- Throws:
java.net.UnknownHostException
-
get
public static java.net.InetAddress get(int pScope, int pSrvHash) throws java.net.UnknownHostExceptionget- Parameters:
pScope-pSrvHash-- Returns:
- InetAddress
- Throws:
java.net.UnknownHostException
-
getSrvTypeHash
public static int getSrvTypeHash(ServiceType pServiceType)
unsigned long slp_hash(const char *pc, unsigned int len) { unsigned long h = 0; while (len-- != 0) { h *= 33; h += *pc++; } return (0x3FF & h); // round to a range of 0-1023 }- Parameters:
pServiceType-- Returns:
- int
-
-