public class NetworkModule extends AbstractQuercusModule
Modifier and Type | Field and Description |
---|---|
static int |
DNS_A |
static int |
DNS_A6 |
static int |
DNS_AAAA |
static int |
DNS_ALL |
static int |
DNS_ANY |
static int |
DNS_CNAME |
static int |
DNS_HINFO |
static int |
DNS_MX |
static int |
DNS_NAPTR |
static int |
DNS_NS |
static int |
DNS_PTR |
static int |
DNS_SOA |
static int |
DNS_SRV |
static int |
DNS_TXT |
static int |
LOG_ALERT |
static int |
LOG_AUTH |
static int |
LOG_AUTHPRIV |
static int |
LOG_CONS |
static int |
LOG_CRIT |
static int |
LOG_CRON |
static int |
LOG_DAEMON |
static int |
LOG_DEBUG |
static int |
LOG_EMERG |
static int |
LOG_ERR |
static int |
LOG_INFO |
static int |
LOG_KERN |
static int |
LOG_LOCAL0 |
static int |
LOG_LOCAL1 |
static int |
LOG_LOCAL2 |
static int |
LOG_LOCAL3 |
static int |
LOG_LOCAL4 |
static int |
LOG_LOCAL5 |
static int |
LOG_LOCAL6 |
static int |
LOG_LOCAL7 |
static int |
LOG_LPR |
static int |
LOG_MAIL |
static int |
LOG_NDELAY |
static int |
LOG_NEWS |
static int |
LOG_NOTICE |
static int |
LOG_NOWAIT |
static int |
LOG_ODELAY |
static int |
LOG_PERROR |
static int |
LOG_PID |
static int |
LOG_SYSLOG |
static int |
LOG_USER |
static int |
LOG_UUCP |
static int |
LOG_WARNING |
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
NetworkModule() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkdnsrr(Env env,
java.lang.String hostname,
java.lang.String type) |
static boolean |
closelog()
Closes syslog.
|
static Value |
define_syslog_variables(Env env)
Initialization of syslog.
|
static boolean |
dns_check_record(Env env,
java.lang.String hostname,
java.lang.String type)
Finds the mx hosts for the given hostname, placing them in mxhosts and
their corresponding weights in weight, if provided.
|
static boolean |
dns_get_mx(Env env,
java.lang.String hostname,
Value mxhosts,
Value weight)
Finds the mx hosts for the given hostname, placing them in mxhosts and
their corresponding weights in weight, if provided.
|
ArrayValue |
dns_get_record(Env env,
java.lang.String hostname,
int type,
Value authnsRef,
Value addtlRef) |
static SocketInputOutput |
fsockopen(Env env,
java.lang.String host,
int port,
Value errno,
Value errstr,
double timeout)
Opens a socket
|
static java.lang.String |
gethostbyaddr(Env env,
java.lang.String ip)
Returns the IP address of the given host name.
|
static java.lang.String |
gethostbyname(java.lang.String hostname)
Returns the IP address of the given host name.
|
static Value |
gethostbynamel(Env env,
java.lang.String hostname)
Returns the IP addresses of the given host name.
|
static Value |
gethostname(Env env) |
static boolean |
getmxrr(Env env,
java.lang.String hostname,
Value mxhosts,
Value weight) |
static Value |
getprotobyname(java.lang.String protoName)
Returns the protocol number associated with the given protocol name.
|
static java.lang.String |
getprotobynumber(int protoNumber)
Returns the protocol name associated with the given protocol number.
|
static Value |
getservbyname(java.lang.String service,
java.lang.String protocol)
Returns the port number associated with the given protocol and service
name.
|
static java.lang.String |
getservbyport(int port,
java.lang.String protocol)
Returns the service name associated it the given protocol name and
service port.
|
static Value |
ip2long(java.lang.String ip)
Converts string to long
|
static StringValue |
long2ip(Env env,
long address) |
static boolean |
openlog(Env env,
java.lang.String ident,
int option,
int facility)
Opens syslog.
|
static SocketInputOutput |
pfsockopen(Env env,
java.lang.String host,
int port,
Value errno,
Value errstr,
double timeout)
Persistent version of fsockopen.
|
static boolean |
syslog(Env env,
int priority,
java.lang.String message)
syslog
|
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions, getLoadedExtensions
public static final int LOG_EMERG
public static final int LOG_ALERT
public static final int LOG_CRIT
public static final int LOG_ERR
public static final int LOG_WARNING
public static final int LOG_NOTICE
public static final int LOG_INFO
public static final int LOG_DEBUG
public static final int LOG_PID
public static final int LOG_CONS
public static final int LOG_NDELAY
public static final int LOG_NOWAIT
public static final int LOG_ODELAY
public static final int LOG_PERROR
public static final int LOG_AUTH
public static final int LOG_AUTHPRIV
public static final int LOG_CRON
public static final int LOG_DAEMON
public static final int LOG_KERN
public static final int LOG_LOCAL0
public static final int LOG_LOCAL1
public static final int LOG_LOCAL2
public static final int LOG_LOCAL3
public static final int LOG_LOCAL4
public static final int LOG_LOCAL5
public static final int LOG_LOCAL6
public static final int LOG_LOCAL7
public static final int LOG_LPR
public static final int LOG_MAIL
public static final int LOG_NEWS
public static final int LOG_SYSLOG
public static final int LOG_USER
public static final int LOG_UUCP
public static final int DNS_A
public static final int DNS_CNAME
public static final int DNS_HINFO
public static final int DNS_MX
public static final int DNS_NS
public static final int DNS_PTR
public static final int DNS_SOA
public static final int DNS_TXT
public static final int DNS_AAAA
public static final int DNS_SRV
public static final int DNS_NAPTR
public static final int DNS_A6
public static final int DNS_ALL
public static final int DNS_ANY
public static SocketInputOutput fsockopen(Env env, java.lang.String host, int port, Value errno, Value errstr, double timeout)
public static SocketInputOutput pfsockopen(Env env, java.lang.String host, int port, Value errno, Value errstr, double timeout)
public static Value ip2long(java.lang.String ip)
public static StringValue long2ip(Env env, long address)
public static java.lang.String gethostbyname(java.lang.String hostname)
hostname
- the host name who's IP to search forpublic static Value gethostbynamel(Env env, java.lang.String hostname)
hostname
- the host name who's IP to search forpublic static java.lang.String gethostbyaddr(Env env, java.lang.String ip)
public static Value getprotobyname(java.lang.String protoName)
protoName
- the name of the protocolpublic static java.lang.String getprotobynumber(int protoNumber)
public static Value getservbyname(java.lang.String service, java.lang.String protocol)
service
- the service nameprotocol
- the protocol, either udp or tcppublic static java.lang.String getservbyport(int port, java.lang.String protocol)
port
- the service port numberprotocol
- the protocol, either udp or tcppublic static boolean getmxrr(Env env, java.lang.String hostname, Value mxhosts, Value weight)
public static boolean dns_get_mx(Env env, java.lang.String hostname, Value mxhosts, Value weight)
hostname
- the hostname to find records formxhosts
- an array to add the mx hosts toweight
- an array to add the weights topublic static boolean checkdnsrr(Env env, java.lang.String hostname, java.lang.String type)
public static boolean dns_check_record(Env env, java.lang.String hostname, java.lang.String type)
hostname
- the hostname to find records forpublic ArrayValue dns_get_record(Env env, java.lang.String hostname, int type, Value authnsRef, Value addtlRef)
public static Value define_syslog_variables(Env env)
public static boolean openlog(Env env, java.lang.String ident, int option, int facility)
public static boolean closelog()
public static boolean syslog(Env env, int priority, java.lang.String message)