Package org.opennms.jicmp.jna
Class Win32V6NativeSocket
- java.lang.Object
-
- org.opennms.jicmp.jna.NativeDatagramSocket
-
- org.opennms.jicmp.jna.Win32V6NativeSocket
-
- All Implemented Interfaces:
AutoCloseable
public class Win32V6NativeSocket extends NativeDatagramSocket
UnixNativeSocketFactory- Author:
- brozow
-
-
Field Summary
-
Fields inherited from class org.opennms.jicmp.jna.NativeDatagramSocket
AF_INET, AF_INET6, IP_MTU_DISCOVER, IPPROTO_ICMP, IPPROTO_ICMPV6, IPPROTO_IP, IPPROTO_IPV6, IPPROTO_UDP, IPV6_DONTFRAG, PF_INET, PF_INET6, SOCK_DGRAM, SOCK_RAW
-
-
Constructor Summary
Constructors Constructor Description Win32V6NativeSocket(int family, int type, int protocol, int listenPort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allowFragmentation(boolean frag)
int
bind(int socket, sockaddr_in6 address, int address_len)
void
close()
int
closesocket(int socket)
int
getSock()
int
receive(NativeDatagramPacket p)
int
recvfrom(int socket, Buffer buffer, int buflen, int flags, sockaddr_in6 in_addr, int[] in_addr_len)
int
send(NativeDatagramPacket p)
int
sendto(int socket, Buffer buffer, int buflen, int flags, sockaddr_in6 dest_addr, int dest_addr_len)
void
setTrafficClass(int tc)
int
socket(int domain, int type, int protocol)
-
Methods inherited from class org.opennms.jicmp.jna.NativeDatagramSocket
allowFragmentation, create, setsockopt, strerror
-
-
-
-
Method Detail
-
bind
public int bind(int socket, sockaddr_in6 address, int address_len) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
socket
public int socket(int domain, int type, int protocol) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
sendto
public int sendto(int socket, Buffer buffer, int buflen, int flags, sockaddr_in6 dest_addr, int dest_addr_len) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
recvfrom
public int recvfrom(int socket, Buffer buffer, int buflen, int flags, sockaddr_in6 in_addr, int[] in_addr_len) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
closesocket
public int closesocket(int socket) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
setTrafficClass
public void setTrafficClass(int tc) throws com.sun.jna.LastErrorException
- Specified by:
setTrafficClass
in classNativeDatagramSocket
- Throws:
com.sun.jna.LastErrorException
-
allowFragmentation
public void allowFragmentation(boolean frag) throws IOException
- Specified by:
allowFragmentation
in classNativeDatagramSocket
- Throws:
IOException
-
receive
public int receive(NativeDatagramPacket p) throws UnknownHostException
- Specified by:
receive
in classNativeDatagramSocket
- Throws:
UnknownHostException
-
send
public int send(NativeDatagramPacket p)
- Specified by:
send
in classNativeDatagramSocket
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in classNativeDatagramSocket
-
getSock
public int getSock()
- Specified by:
getSock
in classNativeDatagramSocket
-
-