NMB packets are so similar to DNS packets; we may as well add NMB as a

name resolution method.
This commit is contained in:
Michael Brown
2005-05-01 11:10:17 +00:00
parent e1d6f3a8ac
commit 3ae7a3d1f0
2 changed files with 125 additions and 0 deletions

22
src/include/nmb.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef NMB_H
#define NMB_H
#include "dns.h"
/*
* NetBIOS name query packets are basically the same as DNS packets,
* though the resource record format is different.
*
*/
#define DNS_TYPE_NB 0x20
#define DNS_FLAG_BROADCAST ( 0x01 << 4 )
#define NBNS_UDP_PORT 137
struct dns_rr_info_nb {
struct dns_rr_info;
uint16_t nb_flags;
struct in_addr nb_address;
} __attribute__ (( packed ));
#endif /* NMB_H */