forked from yaosj2k/dnsforwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addresschunk.h
executable file
·31 lines (19 loc) · 1.02 KB
/
addresschunk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef ADDRESSCHUNK_H_INCLUDED
#define ADDRESSCHUNK_H_INCLUDED
#include "addresslist.h"
#include "stringchunk.h"
#include "querydnsbase.h"
typedef struct _AddressChunk{
AddressList TCPAddresses;
AddressList UDPAddresses;
StringChunk Dedicated;
} AddressChunk;
int AddressChunk_Init(AddressChunk *ac);
int AddressChunk_AddATCPAddress_FromString(AddressChunk *ac, const char *Addr_Port);
int AddressChunk_AddAUDPAddress_FromString(AddressChunk *ac, const char *Addr_Port);
int AddressChunk_AddADedicatedAddress_FromString(AddressChunk *ac, const char *Domain, const char *Addr_Port);
struct sockaddr *AddressChunk_GetDedicated(AddressChunk *ac, sa_family_t *family, const char *RequestingDomain, int *HashValue);
struct sockaddr *AddressChunk_GetOne(AddressChunk *ac, sa_family_t *family, DNSQuaryProtocol Protocol);
struct sockaddr *AddressChunk_GetOneUDPBySubscript(AddressChunk *ac, sa_family_t *family, int Subscript);
int AddressChunk_Advance(AddressChunk *ac, DNSQuaryProtocol Protocol);
#endif // ADDRESSCHUNK_H_INCLUDED