4 #pragma GCC system_header
7 #define NETBIOS_NAME_LENGTH 16
8 #define NETBIOS_UNIQUE_NAME 0
9 #define NETBIOS_GROUP_NAME 1
10 #define NETBIOS_TYPE_QUICK_UNIQUE 2
11 #define NETBIOS_TYPE_QUICK_GROUP 3
14 typedef struct sockaddr_nb
{
17 char snb_name
[NETBIOS_NAME_LENGTH
];
18 } SOCKADDR_NB
, *PSOCKADDR_NB
, *LPSOCKADDR_NB
;
19 #define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) \
22 register char *_n = (_name); \
23 register PSOCKADDR_NB _s = (_snb); \
24 _s->snb_family = AF_NETBIOS; \
25 _s->snb_type = (_type); \
26 for (_i=0; _n[_i] != '\0' && _i<NETBIOS_NAME_LENGTH-1; _i++) { \
27 _s->snb_name[_i] = _n[_i]; \
29 for (; _i<NETBIOS_NAME_LENGTH-1; _i++) { \
30 _s->snb_name[_i] = ' '; \
32 _s->snb_name[NETBIOS_NAME_LENGTH-1] = (_port); \
34 #endif /* RC_INVOKED */