ReactOS  0.4.14-dev-384-g5b37caa
wsnetbs.h
Go to the documentation of this file.
1 #ifndef _WSNETBS_H
2 #define _WSNETBS_H
3 
4 #define NETBIOS_NAME_LENGTH 16
5 #define NETBIOS_UNIQUE_NAME 0
6 #define NETBIOS_GROUP_NAME 1
7 #define NETBIOS_TYPE_QUICK_UNIQUE 2
8 #define NETBIOS_TYPE_QUICK_GROUP 3
9 
10 #ifndef RC_INVOKED
11 typedef struct sockaddr_nb {
12  short snb_family;
16 #define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) \
17 { \
18  register int _i; \
19  register char *_n = (_name); \
20  register PSOCKADDR_NB _s = (_snb); \
21  _s->snb_family = AF_NETBIOS; \
22  _s->snb_type = (_type); \
23  for (_i=0; _n[_i] != '\0' && _i<NETBIOS_NAME_LENGTH-1; _i++) { \
24  _s->snb_name[_i] = _n[_i]; \
25  } \
26  for (; _i<NETBIOS_NAME_LENGTH-1; _i++) { \
27  _s->snb_name[_i] = ' '; \
28  } \
29  _s->snb_name[NETBIOS_NAME_LENGTH-1] = (_port); \
30 }
31 #endif /* RC_INVOKED */
32 #endif
struct sockaddr_nb SOCKADDR_NB
u_short snb_type
Definition: wsnetbs.h:13
struct sockaddr_nb * LPSOCKADDR_NB
short snb_family
Definition: wsnetbs.h:12
struct sockaddr_nb * PSOCKADDR_NB
unsigned short u_short
Definition: types.h:81
#define NETBIOS_NAME_LENGTH
Definition: wsnetbs.h:4
char snb_name[NETBIOS_NAME_LENGTH]
Definition: wsnetbs.h:14