ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

nbt.c File Reference
#include "config.h"
#include <stdarg.h>
#include "winsock2.h"
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#include "winreg.h"
#include "iphlpapi.h"
#include "netbios.h"
#include "nbnamecache.h"

Go to the source code of this file.

Data Structures

struct  NetBTSession
struct  NetBTAdapter
struct  NetBTNameQueryData
struct  NetBTNodeQueryData

Defines

#define PORT_NBNS   137
#define PORT_NBDG   138
#define PORT_NBSS   139
#define INADDR_NONE   ~0UL
#define NBR_ADDWORD(p, word)   (*(WORD *)(p)) = htons(word)
#define NBR_GETWORD(p)   ntohs(*(WORD *)(p))
#define MIN_QUERIES   1
#define MAX_QUERIES   0xffff
#define MIN_QUERY_TIMEOUT   100
#define MAX_QUERY_TIMEOUT   0xffffffff
#define BCAST_QUERIES   3
#define BCAST_QUERY_TIMEOUT   750
#define WINS_QUERIES   3
#define WINS_QUERY_TIMEOUT   750
#define MAX_WINS_SERVERS   2
#define MIN_CACHE_TIMEOUT   60000
#define CACHE_TIMEOUT   360000
#define MAX_NBT_NAME_SZ   255
#define SIMPLE_NAME_QUERY_PKT_SIZE   16 + MAX_NBT_NAME_SZ
#define NBNS_TYPE_NB   0x0020
#define NBNS_TYPE_NBSTAT   0x0021
#define NBNS_CLASS_INTERNET   0x00001
#define NBNS_HEADER_SIZE   (sizeof(WORD) * 6)
#define NBNS_RESPONSE_AND_OPCODE   0xf800
#define NBNS_RESPONSE_AND_QUERY   0x8000
#define NBNS_REPLYCODE   0x0f
#define NBSS_HDRSIZE   4
#define NBSS_MSG   0x00
#define NBSS_REQ   0x81
#define NBSS_ACK   0x82
#define NBSS_NACK   0x83
#define NBSS_RETARGET   0x84
#define NBSS_KEEPALIVE   0x85
#define NBSS_ERR_NOT_LISTENING_ON_NAME   0x80
#define NBSS_ERR_NOT_LISTENING_FOR_CALLER   0x81
#define NBSS_ERR_BAD_NAME   0x82
#define NBSS_ERR_INSUFFICIENT_RESOURCES   0x83
#define NBSS_EXTENSION   0x01

Typedefs

typedef BOOL(* NetBTAnswerCallback )(void *data, WORD answerCount, WORD answerIndex, PUCHAR rData, WORD rdLength)

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (netbios)
static int NetBTNameEncode (const UCHAR *p, UCHAR *buffer)
static DWORD NetBTNameReq (const UCHAR name[NCBNAMSZ], WORD xid, WORD qtype, BOOL broadcast, UCHAR *buffer, int len)
static int NetBTSendNameQuery (SOCKET fd, const UCHAR name[NCBNAMSZ], WORD xid, WORD qtype, DWORD destAddr, BOOL broadcast)
static UCHAR NetBTWaitForNameResponse (const NetBTAdapter *adapter, SOCKET fd, DWORD waitUntil, NetBTAnswerCallback answerCallback, void *data)
static BOOL NetBTFindNameAnswerCallback (void *pVoid, WORD answerCount, WORD answerIndex, PUCHAR rData, WORD rLen)
static UCHAR NetBTNameWaitLoop (const NetBTAdapter *adapter, SOCKET fd, const NCB *ncb, DWORD sendTo, BOOL broadcast, DWORD timeout, DWORD maxQueries, NBNameCacheEntry **cacheEntry)
static UCHAR NetBTStoreCacheEntry (struct NBNameCache **nameCache, NBNameCacheEntry *cacheEntry)
static UCHAR NetBTinetResolve (const UCHAR name[NCBNAMSZ], NBNameCacheEntry **cacheEntry)
static UCHAR NetBTInternalFindName (NetBTAdapter *adapter, PNCB ncb, const NBNameCacheEntry **cacheEntry)
static BOOL NetBTNodeStatusAnswerCallback (void *pVoid, WORD answerCount, WORD answerIndex, PUCHAR rData, WORD rLen)
static UCHAR NetBTAstatRemote (NetBTAdapter *adapter, PNCB ncb)
static UCHAR NetBTAstat (void *adapt, PNCB ncb)
static UCHAR NetBTFindName (void *adapt, PNCB ncb)
static UCHAR NetBTSessionReq (SOCKET fd, const UCHAR *calledName, const UCHAR *callingName)
static UCHAR NetBTCall (void *adapt, PNCB ncb, void **sess)
static UCHAR NetBTSend (void *adapt, void *sess, PNCB ncb)
static UCHAR NetBTRecv (void *adapt, void *sess, PNCB ncb)
static UCHAR NetBTHangup (void *adapt, void *sess)
static void NetBTCleanupAdapter (void *adapt)
static void NetBTCleanup (void)
static UCHAR NetBTRegisterAdapter (const MIB_IPADDRROW *ipRow)
static BOOL NetBTEnumCallback (UCHAR totalLANAs, UCHAR lanaIndex, ULONG transport, const NetBIOSAdapterImpl *data, void *closure)
static UCHAR NetBTEnum (void)
void NetBTInit (void)

Variables

static ULONG gTransportID
static BOOL gEnableDNS
static DWORD gBCastQueries
static DWORD gBCastQueryTimeout
static DWORD gWINSQueries
static DWORD gWINSQueryTimeout
static DWORD gWINSServers [MAX_WINS_SERVERS]
static int gNumWINSServers
static char gScopeID [MAX_SCOPE_ID_LEN]
static DWORD gCacheTimeout
static struct NBNameCachegNameCache
static const WCHAR VxD_MSTCPW []
static const WCHAR NetBT_ParametersW []
static const WCHAR EnableDNSW [] = { 'E','n','a','b','l','e','D','N','S','\0' }
static const WCHAR BcastNameQueryCountW []
static const WCHAR BcastNameQueryTimeoutW []
static const WCHAR NameSrvQueryCountW []
static const WCHAR NameSrvQueryTimeoutW []
static const WCHAR ScopeIDW [] = { 'S','c','o','p','e','I','D','\0' }
static const WCHAR CacheTimeoutW []
static const WCHAR Config_NetworkW []

Generated on Sat May 26 2012 05:13:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.