source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wsnetbs.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 963 bytes
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _WSNETBS_
7#define _WSNETBS_
8
9#define NETBIOS_NAME_LENGTH 16
10
11typedef struct sockaddr_nb {
12 short snb_family;
13 u_short snb_type;
14 char snb_name[NETBIOS_NAME_LENGTH];
15} SOCKADDR_NB,*PSOCKADDR_NB,*LPSOCKADDR_NB;
16
17#define NETBIOS_UNIQUE_NAME (0x0000)
18#define NETBIOS_GROUP_NAME (0x0001)
19#define NETBIOS_TYPE_QUICK_UNIQUE (0x0002)
20#define NETBIOS_TYPE_QUICK_GROUP (0x0003)
21
22#define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) { int _i; (_snb)->snb_family = AF_NETBIOS; (_snb)->snb_type = (_type); for (_i=0; _i<NETBIOS_NAME_LENGTH-1; _i++) { (_snb)->snb_name[_i] = ' '; } for (_i=0; *((_name)+_i)!='\0' && _i<NETBIOS_NAME_LENGTH-1; _i++) { (_snb)->snb_name[_i] = *((_name)+_i); } (_snb)->snb_name[NETBIOS_NAME_LENGTH-1] = (_port); }
23#endif
Note: See TracBrowser for help on using the repository browser.