diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-27 05:20:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:50 -0500 |
commit | 6a0f26c70962cfd4660761d8481b2a3d548af633 (patch) | |
tree | 889efca2d20051e808d6541197b185e73b524d8b | |
parent | 2bf6dff9834fbd2789c60e7bcc8bac0c414ca01a (diff) | |
download | samba-6a0f26c70962cfd4660761d8481b2a3d548af633.tar.gz samba-6a0f26c70962cfd4660761d8481b2a3d548af633.tar.bz2 samba-6a0f26c70962cfd4660761d8481b2a3d548af633.zip |
r3284: - don't use a enum for bit-fields. It isn't legal C (as C is limited to
signed integer values for enum), and it is also very confusing to read.
Also, please align defines nicely. The value of SV_TYPE_DOMAIN_ENUM
was defined incorrectly, which became obvious when you align the
defines, but wasn't at all obvious in the original code.
- removed redundent defines in smb.h
(This used to be commit fe042b8e5ca15dfd986bc0c05d464214a51cc0cf)
-rw-r--r-- | source4/include/smb.h | 30 | ||||
-rw-r--r-- | source4/librpc/idl/svcctl.idl | 70 |
2 files changed, 32 insertions, 68 deletions
diff --git a/source4/include/smb.h b/source4/include/smb.h index fe277ebb99..4354eae862 100644 --- a/source4/include/smb.h +++ b/source4/include/smb.h @@ -468,36 +468,6 @@ typedef struct nt_user_token { otherwise NT will not honour the announce packets */ #define MAX_SERVER_STRING_LENGTH 48 -/* these are used in NetServerEnum to choose what to receive */ -#define SV_TYPE_WORKSTATION 0x00000001 -#define SV_TYPE_SERVER 0x00000002 -#define SV_TYPE_SQLSERVER 0x00000004 -#define SV_TYPE_DOMAIN_CTRL 0x00000008 -#define SV_TYPE_DOMAIN_BAKCTRL 0x00000010 -#define SV_TYPE_TIME_SOURCE 0x00000020 -#define SV_TYPE_AFP 0x00000040 -#define SV_TYPE_NOVELL 0x00000080 -#define SV_TYPE_DOMAIN_MEMBER 0x00000100 -#define SV_TYPE_PRINTQ_SERVER 0x00000200 -#define SV_TYPE_DIALIN_SERVER 0x00000400 -#define SV_TYPE_SERVER_UNIX 0x00000800 -#define SV_TYPE_NT 0x00001000 -#define SV_TYPE_WFW 0x00002000 -#define SV_TYPE_SERVER_MFPN 0x00004000 -#define SV_TYPE_SERVER_NT 0x00008000 -#define SV_TYPE_POTENTIAL_BROWSER 0x00010000 -#define SV_TYPE_BACKUP_BROWSER 0x00020000 -#define SV_TYPE_MASTER_BROWSER 0x00040000 -#define SV_TYPE_DOMAIN_MASTER 0x00080000 -#define SV_TYPE_SERVER_OSF 0x00100000 -#define SV_TYPE_SERVER_VMS 0x00200000 -#define SV_TYPE_WIN95_PLUS 0x00400000 -#define SV_TYPE_DFS_SERVER 0x00800000 -#define SV_TYPE_ALTERNATE_XPORT 0x20000000 -#define SV_TYPE_LOCAL_LIST_ONLY 0x40000000 -#define SV_TYPE_DOMAIN_ENUM 0x80000000 -#define SV_TYPE_ALL 0xFFFFFFFF - /* This was set by JHT in liaison with Jeremy Allison early 1997 * History: * Version 4.0 - never made public diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl index 5003d407f1..c293298499 100644 --- a/source4/librpc/idl/svcctl.idl +++ b/source4/librpc/idl/svcctl.idl @@ -33,44 +33,38 @@ SERVICE_STATUS status; } ENUM_SERVICE_STATUS; - typedef enum { - SERVICE_TYPE_KERNEL_DRIVER=0x01, - SERVICE_TYPE_FS_DRIVER=0x02, - SERVICE_TYPE_ADAPTER=0x04, - SERVICE_TYPE_RECOGNIZER_DRIVER=0x08, - SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER, - SERVICE_TYPE_WIN32_OWN_PROCESS=0x10, - SERVICE_TYPE_WIN32_SHARE_PROCESS=0x20, - SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCESS - } ServiceType; - - typedef enum { - SERVICE_STATE_ACTIVE=0x01, - SERVICE_STATE_INACTIVE=0x02, - SERVICE_STATE_ALL=0x03 - } ServiceState; - - typedef enum { - SV_TYPE_WORKSTATION =0x00000001, - SV_TYPE_SERVER =0x00000002, - SV_TYPE_DOMAIN_CTRL =0x00000008, - SV_TYPE_DOMAIN_BAKCTRL =0x00000010, - SV_TYPE_TIME_SOURCE =0x00000020, - SV_TYPE_AFP =0x00000040, - SV_TYPE_DOMAIN_MEMBER =0x00000100, - SV_TYPE_PRINTQ_SERVER =0x00000200, - SV_TYPE_DIALIN_SERVER =0x00000400, - SV_TYPE_XENIX_SERVER =0x00000800, - SV_TYPE_SERVER_UNIX =0x00000800, - SV_TYPE_NT =0x00001000, - SV_TYPE_WFW =0x00002000, - SV_TYPE_POTENTIAL_BROWSER =0x00010000, - SV_TYPE_BACKUP_BROWSER =0x00020000, - SV_TYPE_MASTER_BROWSER =0x00040000, - SV_TYPE_DOMAIN_MASTER =0x00080000, - SV_TYPE_LOCAL_LIST_ONLY =0x40000000, - SV_TYPE_DOMAIN_ENUM =0x80000000 - } SERVICE_BITS; + const int SERVICE_TYPE_KERNEL_DRIVER = 0x01; + const int SERVICE_TYPE_FS_DRIVER = 0x02; + const int SERVICE_TYPE_ADAPTER = 0x04; + const int SERVICE_TYPE_RECOGNIZER_DRIVER = 0x08; + const int SERVICE_TYPE_DRIVER=SERVICE_TYPE_KERNEL_DRIVER|SERVICE_TYPE_FS_DRIVER|SERVICE_TYPE_RECOGNIZER_DRIVER; + const int SERVICE_TYPE_WIN32_OWN_PROCESS = 0x10; + const int SERVICE_TYPE_WIN32_SHARE_PROCESS = 0x20; + const int SERVICE_TYPE_WIN32=SERVICE_TYPE_WIN32_OWN_PROCESS|SERVICE_TYPE_WIN32_SHARE_PROCES; + + const int SERVICE_STATE_ACTIVE = 0x01; + const int SERVICE_STATE_INACTIVE = 0x02; + const int SERVICE_STATE_ALL = 0x00; + + const int SV_TYPE_WORKSTATION = 0x00000001; + const int SV_TYPE_SERVER = 0x00000002; + const int SV_TYPE_DOMAIN_CTRL = 0x00000008; + const int SV_TYPE_DOMAIN_BAKCTRL = 0x00000010; + const int SV_TYPE_TIME_SOURCE = 0x00000020; + const int SV_TYPE_AFP = 0x00000040; + const int SV_TYPE_DOMAIN_MEMBER = 0x00000100; + const int SV_TYPE_PRINTQ_SERVER = 0x00000200; + const int SV_TYPE_DIALIN_SERVER = 0x00000400; + const int SV_TYPE_XENIX_SERVER = 0x00000800; + const int SV_TYPE_SERVER_UNIX = 0x00000800; + const int SV_TYPE_NT = 0x00001000; + const int SV_TYPE_WFW = 0x00002000; + const int SV_TYPE_POTENTIAL_BROWSER = 0x00010000; + const int SV_TYPE_BACKUP_BROWSER = 0x00020000; + const int SV_TYPE_MASTER_BROWSER = 0x00040000; + const int SV_TYPE_DOMAIN_MASTER = 0x00080000; + const int SV_TYPE_LOCAL_LIST_ONLY = 0x40000000; + const int SV_TYPE_DOMAIN_ENUM = 0x80000000; /*****************/ /* Function 0x00 */ |