setIPv6() — netty Function Reference
Architecture documentation for the setIPv6() function in SockaddrIn.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD df536e25_4700_d8d0_415f_750f8d5a622e["setIPv6()"] 0a4fbaf2_1e5c_bc5c_2cfb_5db23e53ba6c["SockaddrIn"] df536e25_4700_d8d0_415f_750f8d5a622e -->|defined in| 0a4fbaf2_1e5c_bc5c_2cfb_5db23e53ba6c 505efae1_6ca9_d888_e0bd_f38ddda740d0["set()"] 505efae1_6ca9_d888_e0bd_f38ddda740d0 -->|calls| df536e25_4700_d8d0_415f_750f8d5a622e 66acc2f9_19b1_a6f4_38ea_a96b0fbdd651["handleNetworkOrder()"] df536e25_4700_d8d0_415f_750f8d5a622e -->|calls| 66acc2f9_19b1_a6f4_38ea_a96b0fbdd651 style df536e25_4700_d8d0_415f_750f8d5a622e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-io_uring/src/main/java/io/netty/channel/uring/SockaddrIn.java lines 103–132
static int setIPv6(ByteBuffer memory, InetAddress address, int port) {
int position = memory.position();
memory.mark();
try {
// memset
memory.put(SOCKADDR_IN6_EMPTY_ARRAY);
memory.putShort(position + Native.SOCKADDR_IN6_OFFSETOF_SIN6_FAMILY, Native.AF_INET6);
memory.putShort(position + Native.SOCKADDR_IN6_OFFSETOF_SIN6_PORT,
handleNetworkOrder(memory.order(), (short) port));
// Skip sin6_flowinfo as we did memset before
byte[] bytes = address.getAddress();
int offset = Native.SOCKADDR_IN6_OFFSETOF_SIN6_ADDR + Native.IN6_ADDRESS_OFFSETOF_S6_ADDR;
if (bytes.length == IPV4_ADDRESS_LENGTH) {
memory.position(position + offset);
memory.put(IPV4_MAPPED_IPV6_PREFIX);
memory.put(bytes, 0, IPV4_ADDRESS_LENGTH);
// Skip sin6_scope_id as we did memset before
} else {
memory.position(position + offset);
memory.put(bytes, 0, IPV6_ADDRESS_LENGTH);
memory.putInt(position + Native.SOCKADDR_IN6_OFFSETOF_SIN6_SCOPE_ID,
((Inet6Address) address).getScopeId());
}
return Native.SIZEOF_SOCKADDR_IN6;
} finally {
memory.reset();
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does setIPv6() do?
setIPv6() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/SockaddrIn.java.
Where is setIPv6() defined?
setIPv6() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/SockaddrIn.java at line 103.
What does setIPv6() call?
setIPv6() calls 1 function(s): handleNetworkOrder.
What calls setIPv6()?
setIPv6() is called by 1 function(s): set.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free