inet.c
Include dependency graph for inet.c:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"10" [label="stdbool.h" tooltip="stdbool.h"]
"7" [label="atom.h" tooltip="atom.h"]
"13" [label="assert.h" tooltip="assert.h"]
"22" [label="synclist.h" tooltip="synclist.h"]
"30" [label="defaultatoms.h" tooltip="defaultatoms.h"]
"6" [label="stdint.h" tooltip="stdint.h"]
"8" [label="stdlib.h" tooltip="stdlib.h"]
"1" [label="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/inet.c" tooltip="/home/runner/work/AtomVM/AtomVM/src/libAtomVM/inet.c" fillcolor="#BFBFBF"]
"2" [label="inet.h" tooltip="inet.h"]
"4" [label="context.h" tooltip="context.h"]
"29" [label="port.h" tooltip="port.h"]
"18" [label="utils.h" tooltip="utils.h"]
"9" [label="atom_table.h" tooltip="atom_table.h"]
"12" [label="term_typedef.h" tooltip="term_typedef.h"]
"19" [label="stddef.h" tooltip="stddef.h"]
"14" [label="limits.h" tooltip="limits.h"]
"26" [label="refc_binary.h" tooltip="refc_binary.h"]
"24" [label="string.h" tooltip="string.h"]
"17" [label="mailbox.h" tooltip="mailbox.h"]
"23" [label="term.h" tooltip="term.h"]
"11" [label="erl_nif.h" tooltip="erl_nif.h"]
"3" [label="interop.h" tooltip="interop.h"]
"27" [label="resources.h" tooltip="resources.h"]
"21" [label="smp.h" tooltip="smp.h"]
"5" [label="globalcontext.h" tooltip="globalcontext.h"]
"25" [label="memory.h" tooltip="memory.h"]
"20" [label="stdio.h" tooltip="stdio.h"]
"28" [label="timer_list.h" tooltip="timer_list.h"]
"16" [label="list.h" tooltip="list.h"]
"15" [label="inttypes.h" tooltip="inttypes.h"]
"7" -> "6" [dir=forward tooltip="include"]
"7" -> "8" [dir=forward tooltip="include"]
"22" -> "20" [dir=forward tooltip="include"]
"22" -> "16" [dir=forward tooltip="include"]
"22" -> "21" [dir=forward tooltip="include"]
"30" -> "5" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "23" [dir=forward tooltip="include"]
"1" -> "29" [dir=forward tooltip="include"]
"2" -> "3" [dir=forward tooltip="include"]
"2" -> "25" [dir=forward tooltip="include"]
"4" -> "5" [dir=forward tooltip="include"]
"4" -> "16" [dir=forward tooltip="include"]
"4" -> "17" [dir=forward tooltip="include"]
"4" -> "21" [dir=forward tooltip="include"]
"4" -> "23" [dir=forward tooltip="include"]
"4" -> "28" [dir=forward tooltip="include"]
"29" -> "4" [dir=forward tooltip="include"]
"29" -> "30" [dir=forward tooltip="include"]
"29" -> "5" [dir=forward tooltip="include"]
"29" -> "25" [dir=forward tooltip="include"]
"29" -> "23" [dir=forward tooltip="include"]
"18" -> "19" [dir=forward tooltip="include"]
"18" -> "20" [dir=forward tooltip="include"]
"18" -> "8" [dir=forward tooltip="include"]
"9" -> "10" [dir=forward tooltip="include"]
"9" -> "7" [dir=forward tooltip="include"]
"12" -> "13" [dir=forward tooltip="include"]
"12" -> "14" [dir=forward tooltip="include"]
"12" -> "15" [dir=forward tooltip="include"]
"12" -> "6" [dir=forward tooltip="include"]
"26" -> "10" [dir=forward tooltip="include"]
"26" -> "8" [dir=forward tooltip="include"]
"26" -> "16" [dir=forward tooltip="include"]
"26" -> "27" [dir=forward tooltip="include"]
"17" -> "10" [dir=forward tooltip="include"]
"17" -> "16" [dir=forward tooltip="include"]
"17" -> "12" [dir=forward tooltip="include"]
"17" -> "18" [dir=forward tooltip="include"]
"23" -> "10" [dir=forward tooltip="include"]
"23" -> "6" [dir=forward tooltip="include"]
"23" -> "20" [dir=forward tooltip="include"]
"23" -> "8" [dir=forward tooltip="include"]
"23" -> "24" [dir=forward tooltip="include"]
"23" -> "25" [dir=forward tooltip="include"]
"23" -> "26" [dir=forward tooltip="include"]
"23" -> "18" [dir=forward tooltip="include"]
"23" -> "12" [dir=forward tooltip="include"]
"11" -> "12" [dir=forward tooltip="include"]
"3" -> "4" [dir=forward tooltip="include"]
"3" -> "23" [dir=forward tooltip="include"]
"27" -> "8" [dir=forward tooltip="include"]
"27" -> "11" [dir=forward tooltip="include"]
"27" -> "16" [dir=forward tooltip="include"]
"27" -> "25" [dir=forward tooltip="include"]
"21" -> "10" [dir=forward tooltip="include"]
"5" -> "6" [dir=forward tooltip="include"]
"5" -> "7" [dir=forward tooltip="include"]
"5" -> "9" [dir=forward tooltip="include"]
"5" -> "11" [dir=forward tooltip="include"]
"5" -> "16" [dir=forward tooltip="include"]
"5" -> "17" [dir=forward tooltip="include"]
"5" -> "21" [dir=forward tooltip="include"]
"5" -> "22" [dir=forward tooltip="include"]
"5" -> "23" [dir=forward tooltip="include"]
"5" -> "28" [dir=forward tooltip="include"]
"25" -> "6" [dir=forward tooltip="include"]
"25" -> "8" [dir=forward tooltip="include"]
"25" -> "11" [dir=forward tooltip="include"]
"25" -> "12" [dir=forward tooltip="include"]
"25" -> "18" [dir=forward tooltip="include"]
"28" -> "10" [dir=forward tooltip="include"]
"28" -> "6" [dir=forward tooltip="include"]
"28" -> "16" [dir=forward tooltip="include"]
}](../../../_images/graphviz-ee024a788ae0f589a3e666a724c817380acf4923.png)
Functions
-
enum inet_domain inet_atom_to_domain(term domain, GlobalContext *global)
Parse an inet domain atom.
- Parameters:
domain – the inet domain atom
global – the global context
- Returns:
InetDomain or InetInvalidDomain
-
enum inet_type inet_atom_to_type(term type, GlobalContext *global)
Parse an inet type.
- Parameters:
type – the inet type atom
global – the global context
- Returns:
the parsed type
-
enum inet_protocol inet_atom_to_protocol(term protocol, GlobalContext *global)
Parse an inet protocol.
- Parameters:
protocol – the inet protocol atom
global – the global context
- Returns:
the parsed protocol
-
uint32_t inet_addr4_to_uint32(term addr_tuple)
Parse an inet IPv4 address tuple.
- Parameters:
addr_tuple – the tuple to parse
- Returns:
the address as a uint32_t, in host order
-
term inet_make_addr4(uint32_t addr, Heap *heap)
Make an inet IPv4 address tuple.
this function requires that at least INET_ADDR4_TUPLE_SIZE terms are free on the heap.
- Parameters:
addr – the address to make as a tuple, as a uint32_t in host order
heap – the heap to build the tuple in
- Returns:
the tuple
Variables
- static const AtomStringIntPair inet_domain_table [] = {{ATOM_STR("\x4", "inet"), InetDomain },}
- static const AtomStringIntPair inet_type_table [] = {{ATOM_STR("\x6", "stream"), InetStreamType },{ATOM_STR("\x5", "dgram"), InetDgramType },}
- static const AtomStringIntPair inet_protocol_table [] = {{ATOM_STR("\x2", "ip"), InetIpProtocol },{ATOM_STR("\x3", "tcp"), InetTcpProtocol },{ATOM_STR("\x3", "udp"), InetUdpProtocol },}