[http] Allow for domain names within NTLM user names
[ipxe.git] / src / include / ipxe / netbios.h
1 #ifndef _IPXE_NETBIOS_H
2 #define _IPXE_NETBIOS_H
3
4 /** @file
5 *
6 * NetBIOS user names
7 *
8 */
9
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12 extern const char * netbios_domain ( char **username );
13
14 /**
15 * Restore NetBIOS [domain\]username
16 *
17 * @v domain NetBIOS domain name
18 * @v username NetBIOS user name
19 *
20 * Restore the separator in a NetBIOS [domain\]username as split by
21 * netbios_domain().
22 */
23 static inline void netbios_domain_undo ( const char *domain, char *username ) {
24
25 /* Restore separator, if applicable */
26 if ( domain )
27 username[-1] = '\\';
28 }
29
30 #endif /* _IPXE_NETBIOS_H */