public class IPv6MulticastAddressFactory extends Object
SVRLOC 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 and Description |
|---|
IPv6MulticastAddressFactory() |
| Modifier and Type | Method and Description |
|---|---|
static InetAddress |
get(int pScope,
int pSrvHash)
get
|
static InetAddress |
get(int pScope,
ServiceType pSrvType)
get
|
static InetAddress |
get(int pScope,
SLPMessage pMsg)
get
|
static InetAddress |
getSrvLocAddress(int pScope)
getSrvLocAddress
|
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
}
|
public static InetAddress getSrvLocAddress(int pScope) throws UnknownHostException
pScope - UnknownHostExceptionpublic static InetAddress get(int pScope, SLPMessage pMsg) throws UnknownHostException
pScope - pMsg - UnknownHostExceptionpublic static InetAddress get(int pScope, ServiceType pSrvType) throws UnknownHostException
pScope - pSrvType - UnknownHostExceptionpublic static InetAddress get(int pScope, int pSrvHash) throws UnknownHostException
pScope - pSrvHash - UnknownHostExceptionpublic 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
}
pServiceType - Copyright © 2005, 2012 IBM Corporation. All Rights Reserved.