14#include "mdnsd_config.h"
20# pragma push_macro("SLIST_ENTRY")
22# define POP_SLIST_ENTRY
26# define _WINSOCK_DEPRECATED_NO_WARNINGS
31#define in_addr_t unsigned __int32
37# undef POP_SLIST_ENTRY
38# pragma pop_macro("SLIST_ENTRY")
43# include <arpa/inet.h>
46#if !defined(__bool_true_false_are_defined) && defined(_MSC_VER) && _MSC_VER < 1600
62#define MAX_PACKET_LEN 10000
63#define MAX_NUM_LABELS 20
80 unsigned long int ttl;
112 unsigned short int id;
138void MDNSD_EXPORT
short2net(uint16_t i,
unsigned char **bufp);
139void MDNSD_EXPORT
long2net (uint32_t l,
unsigned char **bufp);
148void MDNSD_EXPORT
message_qd(
struct message *m,
char *name,
unsigned short int type,
unsigned short int clazz);
151void MDNSD_EXPORT
message_an(
struct message *m,
char *name,
unsigned short int type,
unsigned short int clazz,
unsigned long ttl);
152void MDNSD_EXPORT
message_ns(
struct message *m,
char *name,
unsigned short int type,
unsigned short int clazz,
unsigned long ttl);
153void MDNSD_EXPORT
message_ar(
struct message *m,
char *name,
unsigned short int type,
unsigned short int clazz,
unsigned long ttl);
159 unsigned short int port,
char *name);
int MDNSD_EXPORT message_packet_len(struct message *m)
unsigned char MDNSD_EXPORT * message_packet(struct message *m)
void MDNSD_EXPORT message_rdata_name(struct message *m, char *name)
void MDNSD_EXPORT message_ar(struct message *m, char *name, unsigned short int type, unsigned short int clazz, unsigned long ttl)
void MDNSD_EXPORT message_qd(struct message *m, char *name, unsigned short int type, unsigned short int clazz)
void MDNSD_EXPORT message_rdata_srv(struct message *m, unsigned short int priority, unsigned short int weight, unsigned short int port, char *name)
#define MAX_PACKET_LEN
Familiarize yourself with RFC1035 if you want to know what all the variable names mean.
void MDNSD_EXPORT message_rdata_raw(struct message *m, unsigned char *rdata, unsigned short int rdlength)
void MDNSD_EXPORT message_an(struct message *m, char *name, unsigned short int type, unsigned short int clazz, unsigned long ttl)
uint16_t net2short(const unsigned char **bufp)
void MDNSD_EXPORT message_rdata_long(struct message *m, struct in_addr l)
void MDNSD_EXPORT long2net(uint32_t l, unsigned char **bufp)
uint32_t net2long(const unsigned char **bufp)
bool MDNSD_EXPORT message_parse(struct message *m, unsigned char *packet, size_t packetLen)
void MDNSD_EXPORT message_ns(struct message *m, char *name, unsigned short int type, unsigned short int clazz, unsigned long ttl)
void MDNSD_EXPORT short2net(uint16_t i, unsigned char **bufp)
struct message * message_wire(void)
unsigned short int arcount
unsigned short int ancount
unsigned short int qdcount
struct message::@6 header
unsigned char _packet[10000]
unsigned short int nscount
struct resource::@0::@2 ns
struct resource::@0::@4 ptr
unsigned short int weight
struct resource::@0::@5 srv
unsigned short int rdlength
struct resource::@0::@3 cname
struct resource::@0::@1 a
unsigned short int priority