KronkNet 1.0
Loading...
Searching...
No Matches
address.h
1/*
2** FREE PROJECT, 2026
3** KRONKNET
4** File description:
5** IPv4 and IPv6 addresses, the same way.
6*/
7#ifndef KRONKNET_ADDRESS_H
8 #define KRONKNET_ADDRESS_H
9 #include "kronknet/macros/types.h"
10 #include "../../platform/socket.h"
11 #include <stddef.h>
12 #include <stdint.h>
13
15
24int knAddr_fromIp(knAddr *addr, const char *ip, knPort port);
25
27
32void knAddr_any(knAddr *addr, int family, knPort port);
33
35
39knPort knAddr_getPort(const knAddr *addr);
40
42
47knBool knAddr_isMappedV4(const knAddr *addr);
48
50
61int knAddr_toIp(const knAddr *addr, char *ip, size_t size);
62
64
68knBool knAddr_equal(const knAddr *a, const knAddr *b);
69
71
79uint64_t knAddr_hash(const knAddr *addr);
80
81#endif /* KRONKNET_ADDRESS_H */