summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/netbios.h
blob: c11552556832b44e56c04488a2dedf7b1fd6c338 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef _IPXE_NETBIOS_H
#define _IPXE_NETBIOS_H

/** @file
 *
 * NetBIOS user names
 *
 */

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );

extern const char * netbios_domain ( char **username );

/**
 * Restore NetBIOS [domain\]username
 *
 * @v domain		NetBIOS domain name
 * @v username		NetBIOS user name
 *
 * Restore the separator in a NetBIOS [domain\]username as split by
 * netbios_domain().
 */
static inline void netbios_domain_undo ( const char *domain, char *username ) {

	/* Restore separator, if applicable */
	if ( domain )
		username[-1] = '\\';
}

#endif /* _IPXE_NETBIOS_H */