From b79aed8592fa2a388f63098406c1f1b88d1da7eb Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Wed, 29 Apr 2015 20:14:34 -0700 Subject: [PATCH] Convert all uses of uint8/16/32 to _t in nmbd and the include file. Signed-off-by: Richard Sharpe Reviewed-by: Jeremy Allison --- source3/include/nameserv.h | 12 +++++------ source3/nmbd/nmbd_become_dmb.c | 4 ++-- source3/nmbd/nmbd_become_lmb.c | 8 ++++---- source3/nmbd/nmbd_browsesync.c | 4 ++-- source3/nmbd/nmbd_elections.c | 8 ++++---- source3/nmbd/nmbd_incomingdgrams.c | 12 +++++------ source3/nmbd/nmbd_incomingrequests.c | 4 ++-- source3/nmbd/nmbd_lmhosts.c | 6 +++--- source3/nmbd/nmbd_logonnames.c | 4 ++-- source3/nmbd/nmbd_mynames.c | 4 ++-- source3/nmbd/nmbd_namelistdb.c | 6 +++--- source3/nmbd/nmbd_nameregister.c | 14 ++++++------- source3/nmbd/nmbd_packets.c | 28 +++++++++++++------------- source3/nmbd/nmbd_processlogon.c | 6 +++--- source3/nmbd/nmbd_responserecordsdb.c | 4 ++-- source3/nmbd/nmbd_sendannounce.c | 6 +++--- source3/nmbd/nmbd_serverlistdb.c | 12 +++++------ source3/nmbd/nmbd_subnetdb.c | 2 +- source3/nmbd/nmbd_synclists.c | 6 +++--- source3/nmbd/nmbd_winsproxy.c | 2 +- source3/nmbd/nmbd_winsserver.c | 38 +++++++++++++++++------------------ source3/nmbd/nmbd_workgroupdb.c | 2 +- 22 files changed, 96 insertions(+), 96 deletions(-) diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h index 378d25e9f75..29b2d876e0d 100644 --- a/source3/include/nameserv.h +++ b/source3/include/nameserv.h @@ -199,7 +199,7 @@ enum logon_state { struct subnet_record; struct nmb_data { - uint16 nb_flags; /* Netbios flags. */ + uint16_t nb_flags; /* Netbios flags. */ int num_ips; /* Number of ip entries. */ struct in_addr *ip; /* The ip list for this name. */ @@ -235,7 +235,7 @@ struct browse_cache_record { /* used for server information: client, nameserv and ipc */ struct server_info_struct { fstring name; - uint32 type; + uint32_t type; fstring comment; fstring domain; /* used ONLY in ipc.c NOT namework.c */ bool server_added; /* used ONLY in ipc.c NOT namework.c */ @@ -289,7 +289,7 @@ struct work_record { bool RunningElection; bool needelection; int ElectionCount; - uint32 ElectionCriterion; + uint32_t ElectionCriterion; /* Domain master browser info. Used for efficient syncs. */ struct nmb_name dmb_name; @@ -337,7 +337,7 @@ typedef void (*fail_function)(struct subnet_record *, struct response_record *, typedef void (*register_name_success_function)( struct subnet_record *, struct userdata_struct *, struct nmb_name *, - uint16, + uint16_t, int, struct in_addr); typedef void (*register_name_fail_function)( struct subnet_record *, @@ -355,7 +355,7 @@ typedef void (*release_name_fail_function)( struct subnet_record *, typedef void (*refresh_name_success_function)( struct subnet_record *, struct userdata_struct *, struct nmb_name *, - uint16, + uint16_t, int, struct in_addr); typedef void (*refresh_name_fail_function)( struct subnet_record *, @@ -386,7 +386,7 @@ struct response_record { struct response_record *next; struct response_record *prev; - uint16 response_id; + uint16_t response_id; /* Callbacks for packets received or not. */ response_function resp_fn; diff --git a/source3/nmbd/nmbd_become_dmb.c b/source3/nmbd/nmbd_become_dmb.c index a3b3d585ce9..8246f595524 100644 --- a/source3/nmbd/nmbd_become_dmb.c +++ b/source3/nmbd/nmbd_become_dmb.c @@ -24,7 +24,7 @@ #include "../librpc/gen_ndr/svcctl.h" #include "nmbd/nmbd.h" -extern uint16 samba_nb_type; /* Samba's NetBIOS type. */ +extern uint16_t samba_nb_type; /* Samba's NetBIOS type. */ static void become_domain_master_browser_bcast(const char *); @@ -76,7 +76,7 @@ workgroup %s on subnet %s. Couldn't register name %s.\n", static void become_domain_master_stage2(struct subnet_record *subrec, struct userdata_struct *userdata, struct nmb_name *registered_name, - uint16 nb_flags, + uint16_t nb_flags, int ttl, struct in_addr registered_ip) { unstring regname; diff --git a/source3/nmbd/nmbd_become_lmb.c b/source3/nmbd/nmbd_become_lmb.c index f94efd03711..80c699f2d91 100644 --- a/source3/nmbd/nmbd_become_lmb.c +++ b/source3/nmbd/nmbd_become_lmb.c @@ -24,7 +24,7 @@ #include "nmbd/nmbd.h" #include "../librpc/gen_ndr/svcctl.h" -extern uint16 samba_nb_type; /* Samba's NetBIOS name type. */ +extern uint16_t samba_nb_type; /* Samba's NetBIOS name type. */ /******************************************************************* Utility function to add a name to the unicast subnet, or add in @@ -32,7 +32,7 @@ extern uint16 samba_nb_type; /* Samba's NetBIOS name type. */ ******************************************************************/ void insert_permanent_name_into_unicast( struct subnet_record *subrec, - struct nmb_name *nmbname, uint16 nb_type ) + struct nmb_name *nmbname, uint16_t nb_type ) { unstring name; struct name_record *namerec; @@ -324,7 +324,7 @@ in workgroup %s on subnet %s\n", static void become_local_master_stage2(struct subnet_record *subrec, struct userdata_struct *userdata, struct nmb_name *registered_name, - uint16 nb_flags, + uint16_t nb_flags, int ttl, struct in_addr registered_ip) { int i = 0; @@ -437,7 +437,7 @@ workgroup %s on subnet %s\n", failname, subrec->subnet_name)); static void become_local_master_stage1(struct subnet_record *subrec, struct userdata_struct *userdata, struct nmb_name *registered_name, - uint16 nb_flags, + uint16_t nb_flags, int ttl, struct in_addr registered_ip) { char *work_name = userdata->data; diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c index 30d2891a863..b1517f89c9f 100644 --- a/source3/nmbd/nmbd_browsesync.c +++ b/source3/nmbd/nmbd_browsesync.c @@ -202,7 +202,7 @@ static void domain_master_node_status_success(struct subnet_record *subrec, while (numnames--) { unstring qname; - uint16 nb_flags; + uint16_t nb_flags; int name_type; pull_ascii_nstring(qname, sizeof(qname), p); @@ -424,7 +424,7 @@ static void get_domain_master_name_node_status_success(struct subnet_record *sub while (numnames--) { unstring qname; - uint16 nb_flags; + uint16_t nb_flags; int name_type; pull_ascii_nstring(qname, sizeof(qname), p); diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index 04a08071a32..16988c8aec8 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -31,7 +31,7 @@ extern time_t StartupTime; **************************************************************************/ static void send_election_dgram(struct subnet_record *subrec, const char *workgroup_name, - uint32 criterion, int timeup,const char *server_name) + uint32_t criterion, int timeup,const char *server_name) { char outbuf[1024]; unstring srv_name; @@ -214,10 +214,10 @@ yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name )); ******************************************************************/ static bool win_election(struct work_record *work, int version, - uint32 criterion, int timeup, const char *server_name) + uint32_t criterion, int timeup, const char *server_name) { int mytimeup = time(NULL) - StartupTime; - uint32 mycriterion = work->ElectionCriterion; + uint32_t mycriterion = work->ElectionCriterion; /* If local master is false then never win in election broadcasts. */ if(!lp_local_master()) { @@ -260,7 +260,7 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, con { struct dgram_packet *dgram = &p->packet.dgram; int version = CVAL(buf,0); - uint32 criterion = IVAL(buf,1); + uint32_t criterion = IVAL(buf,1); int timeup = IVAL(buf,5)/1000; unstring server_name; struct work_record *work; diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c index 3623c0807a3..b728c13e5fe 100644 --- a/source3/nmbd/nmbd_incomingdgrams.c +++ b/source3/nmbd/nmbd_incomingdgrams.c @@ -99,7 +99,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p struct dgram_packet *dgram = &p->packet.dgram; int ttl = IVAL(buf,1)/1000; unstring announce_name; - uint32 servertype = IVAL(buf,23); + uint32_t servertype = IVAL(buf,23); fstring comment; struct work_record *work; struct server_record *servrec; @@ -197,7 +197,7 @@ void process_workgroup_announce(struct subnet_record *subrec, struct packet_stru int ttl = IVAL(buf,1)/1000; unstring workgroup_announce_name; unstring master_name; - uint32 servertype = IVAL(buf,23); + uint32_t servertype = IVAL(buf,23); struct work_record *work; unstring source_name; unstring dest_name; @@ -250,7 +250,7 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s struct dgram_packet *dgram = &p->packet.dgram; int ttl = IVAL(buf,1)/1000; unstring server_name; - uint32 servertype = IVAL(buf,23); + uint32_t servertype = IVAL(buf,23); fstring comment; unstring work_name; struct work_record *work = NULL; @@ -408,7 +408,7 @@ done: void process_lm_host_announce(struct subnet_record *subrec, struct packet_struct *p, const char *buf, int len) { struct dgram_packet *dgram = &p->packet.dgram; - uint32 servertype = IVAL(buf,1); + uint32_t servertype = IVAL(buf,1); int osmajor=CVAL(buf,5); /* major version of node software */ int osminor=CVAL(buf,6); /* minor version of node software */ int ttl = SVAL(buf,7); @@ -526,7 +526,7 @@ static void send_backup_list_response(struct subnet_record *subrec, struct work_record *work, struct nmb_name *send_to_name, unsigned char max_number_requested, - uint32 token, struct in_addr sendto_ip, + uint32_t token, struct in_addr sendto_ip, int port) { char outbuf[1024]; @@ -634,7 +634,7 @@ void process_get_backup_list_request(struct subnet_record *subrec, struct dgram_packet *dgram = &p->packet.dgram; struct work_record *work; unsigned char max_number_requested = CVAL(buf,0); - uint32 token = IVAL(buf,1); /* Sender's key index for the workgroup. */ + uint32_t token = IVAL(buf,1); /* Sender's key index for the workgroup. */ int name_type = dgram->dest_name.name_type; unstring workgroup_name; struct subnet_record *search_subrec = subrec; diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c index 562c388ee29..6f3eee36890 100644 --- a/source3/nmbd/nmbd_incomingrequests.c +++ b/source3/nmbd/nmbd_incomingrequests.c @@ -60,7 +60,7 @@ void process_name_release_request(struct subnet_record *subrec, struct nmb_name *question = &nmb->question.question_name; unstring qname; bool bcast = nmb->header.nm_flags.bcast; - uint16 nb_flags = get_nb_flags(nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(nmb->additional->rdata); bool group = (nb_flags & NB_GROUP) ? True : False; struct name_record *namerec; int rcode = 0; @@ -192,7 +192,7 @@ void process_name_registration_request(struct subnet_record *subrec, struct nmb_packet *nmb = &p->packet.nmb; struct nmb_name *question = &nmb->question.question_name; bool bcast = nmb->header.nm_flags.bcast; - uint16 nb_flags = get_nb_flags(nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(nmb->additional->rdata); bool group = (nb_flags & NB_GROUP) ? True : False; struct name_record *namerec = NULL; int ttl = nmb->additional->ttl; diff --git a/source3/nmbd/nmbd_lmhosts.c b/source3/nmbd/nmbd_lmhosts.c index c3eb2b58dd4..80d89930fd4 100644 --- a/source3/nmbd/nmbd_lmhosts.c +++ b/source3/nmbd/nmbd_lmhosts.c @@ -70,11 +70,11 @@ void load_lmhosts_file(const char *fname) if(name_type == -1) { /* Add the (0) and (0x20) names directly into the namelist for this subnet. */ - (void)add_name_to_subnet(subrec,name,0x00,(uint16)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr); - (void)add_name_to_subnet(subrec,name,0x20,(uint16)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr); + (void)add_name_to_subnet(subrec,name,0x00,(uint16_t)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr); + (void)add_name_to_subnet(subrec,name,0x20,(uint16_t)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr); } else { /* Add the given name type to the subnet namelist. */ - (void)add_name_to_subnet(subrec,name,name_type,(uint16)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr); + (void)add_name_to_subnet(subrec,name,name_type,(uint16_t)NB_ACTIVE,PERMANENT_TTL,source,1,&ipaddr); } } diff --git a/source3/nmbd/nmbd_logonnames.c b/source3/nmbd/nmbd_logonnames.c index 9a05095bfd0..bb1514fd0ef 100644 --- a/source3/nmbd/nmbd_logonnames.c +++ b/source3/nmbd/nmbd_logonnames.c @@ -24,7 +24,7 @@ #include "../librpc/gen_ndr/svcctl.h" #include "nmbd/nmbd.h" -extern uint16 samba_nb_type; /* Samba's NetBIOS type. */ +extern uint16_t samba_nb_type; /* Samba's NetBIOS type. */ /**************************************************************************** Fail to become a Logon server on a subnet. @@ -72,7 +72,7 @@ workgroup %s on subnet %s. Couldn't register name %s.\n", static void become_logon_server_success(struct subnet_record *subrec, struct userdata_struct *userdata, struct nmb_name *registered_name, - uint16 nb_flags, + uint16_t nb_flags, int ttl, struct in_addr registered_ip) { unstring reg_name; diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c index e3798507c21..f3578b1f1b3 100644 --- a/source3/nmbd/nmbd_mynames.c +++ b/source3/nmbd/nmbd_mynames.c @@ -23,7 +23,7 @@ #include "includes.h" #include "nmbd/nmbd.h" -extern uint16 samba_nb_type; /* Samba's NetBIOS type. */ +extern uint16_t samba_nb_type; /* Samba's NetBIOS type. */ /**************************************************************************** Fail funtion when registering my netbios names. @@ -83,7 +83,7 @@ Exiting.\n", lp_workgroup(), subrec->subnet_name)); ******************************************************************/ static void insert_refresh_name_into_unicast( struct subnet_record *subrec, - struct nmb_name *nmbname, uint16 nb_type ) + struct nmb_name *nmbname, uint16_t nb_type ) { struct name_record *namerec; diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c index 313e4a68772..c7bcb6a90f1 100644 --- a/source3/nmbd/nmbd_namelistdb.c +++ b/source3/nmbd/nmbd_namelistdb.c @@ -24,7 +24,7 @@ #include "system/filesys.h" #include "nmbd/nmbd.h" -uint16 samba_nb_type = 0; /* samba's NetBIOS name type */ +uint16_t samba_nb_type = 0; /* samba's NetBIOS name type */ /************************************************************************** @@ -191,7 +191,7 @@ void update_name_ttl( struct name_record *namerec, int ttl ) bool add_name_to_subnet( struct subnet_record *subrec, const char *name, int type, - uint16 nb_flags, + uint16_t nb_flags, int ttl, enum name_source source, int num_ips, @@ -286,7 +286,7 @@ ttl=%d nb_flags=%2x to subnet %s\n", void standard_success_register(struct subnet_record *subrec, struct userdata_struct *userdata, - struct nmb_name *nmbname, uint16 nb_flags, int ttl, + struct nmb_name *nmbname, uint16_t nb_flags, int ttl, struct in_addr registered_ip) { struct name_record *namerec; diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c index 8b078e6859a..4a23c3a42b9 100644 --- a/source3/nmbd/nmbd_nameregister.c +++ b/source3/nmbd/nmbd_nameregister.c @@ -47,7 +47,7 @@ static void register_name_response(struct subnet_record *subrec, struct nmb_name *answer_name = &nmb->answers->rr_name; struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb; int ttl = 0; - uint16 nb_flags = 0; + uint16_t nb_flags = 0; struct in_addr register_ip; fstring reg_name; @@ -210,7 +210,7 @@ static void wins_registration_timeout(struct subnet_record *subrec, failure, and go into our standard name refresh mode. This copes with all the wins servers being down */ if (wins_srv_is_dead(rrec->packet->ip, register_ip)) { - uint16 nb_flags = get_nb_flags(sent_nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(sent_nmb->additional->rdata); int ttl = sent_nmb->additional->ttl; standard_success_register(subrec, userdata, nmbname, nb_flags, ttl, register_ip); @@ -261,7 +261,7 @@ static void register_name_timeout_response(struct subnet_record *subrec, bool bcast = sent_nmb->header.nm_flags.bcast; bool success = False; struct nmb_name *question_name = &sent_nmb->question.question_name; - uint16 nb_flags = 0; + uint16_t nb_flags = 0; int ttl = 0; struct in_addr registered_ip; @@ -306,7 +306,7 @@ static void register_name_timeout_response(struct subnet_record *subrec, ****************************************************************************/ static void multihomed_register_one(struct nmb_name *nmbname, - uint16 nb_flags, + uint16_t nb_flags, register_name_success_function success_fn, register_name_fail_function fail_fn, struct in_addr ip, @@ -356,7 +356,7 @@ static void wins_next_registration(struct response_record *rrec) { struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb; struct nmb_name *nmbname = &sent_nmb->question.question_name; - uint16 nb_flags = get_nb_flags(sent_nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(sent_nmb->additional->rdata); struct userdata_struct *userdata = rrec->userdata; const char *tag; struct in_addr last_ip; @@ -400,7 +400,7 @@ static void wins_next_registration(struct response_record *rrec) Try and register one of our names on the unicast subnet - multihomed. ****************************************************************************/ -static void multihomed_register_name(struct nmb_name *nmbname, uint16 nb_flags, +static void multihomed_register_name(struct nmb_name *nmbname, uint16_t nb_flags, register_name_success_function success_fn, register_name_fail_function fail_fn) { @@ -475,7 +475,7 @@ static void multihomed_register_name(struct nmb_name *nmbname, uint16 nb_flags, ****************************************************************************/ void register_name(struct subnet_record *subrec, - const char *name, int type, uint16 nb_flags, + const char *name, int type, uint16_t nb_flags, register_name_success_function success_fn, register_name_fail_function fail_fn, struct userdata_struct *userdata) diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 7a707a045b9..9f5cc18039d 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -94,12 +94,12 @@ static int find_subnet_mailslot_fd_for_address( struct in_addr local_ip ) Get/Set problematic nb_flags as network byte order 16 bit int. **************************************************************************/ -uint16 get_nb_flags(char *buf) +uint16_t get_nb_flags(char *buf) { - return ((((uint16)*buf)&0xFFFF) & NB_FLGMSK); + return ((((uint16_t)*buf)&0xFFFF) & NB_FLGMSK); } -void set_nb_flags(char *buf, uint16 nb_flags) +void set_nb_flags(char *buf, uint16_t nb_flags) { *buf++ = ((nb_flags & NB_FLGMSK) & 0xFF); *buf = '\0'; @@ -145,9 +145,9 @@ static void debug_browse_data(const char *outbuf, int len) Generates the unique transaction identifier **************************************************************************/ -static uint16 name_trn_id=0; +static uint16_t name_trn_id=0; -static uint16 generate_name_trn_id(void) +static uint16_t generate_name_trn_id(void) { if (!name_trn_id) { name_trn_id = ((unsigned)time(NULL)%(unsigned)0x7FFF) + ((unsigned)getpid()%(unsigned)100); @@ -242,7 +242,7 @@ static struct packet_struct *create_and_init_netbios_packet(struct nmb_name *nmb **************************************************************************/ static bool create_and_init_additional_record(struct packet_struct *packet, - uint16 nb_flags, + uint16_t nb_flags, const struct in_addr *register_ip) { struct nmb_packet *nmb = &packet->packet.nmb; @@ -335,7 +335,7 @@ static bool initiate_name_query_packet_from_wins_server( struct packet_struct *p **************************************************************************/ static bool initiate_name_register_packet( struct packet_struct *packet, - uint16 nb_flags, const struct in_addr *register_ip) + uint16_t nb_flags, const struct in_addr *register_ip) { struct nmb_packet *nmb = &packet->packet.nmb; @@ -359,7 +359,7 @@ static bool initiate_name_register_packet( struct packet_struct *packet, **************************************************************************/ static bool initiate_multihomed_name_register_packet(struct packet_struct *packet, - uint16 nb_flags, struct in_addr *register_ip) + uint16_t nb_flags, struct in_addr *register_ip) { struct nmb_packet *nmb = &packet->packet.nmb; fstring second_ip_buf; @@ -387,7 +387,7 @@ for name %s IP %s (bcast=%s) to IP %s\n", **************************************************************************/ static bool initiate_name_refresh_packet( struct packet_struct *packet, - uint16 nb_flags, struct in_addr *refresh_ip) + uint16_t nb_flags, struct in_addr *refresh_ip) { struct nmb_packet *nmb = &packet->packet.nmb; @@ -411,7 +411,7 @@ static bool initiate_name_refresh_packet( struct packet_struct *packet, **************************************************************************/ static bool initiate_name_release_packet( struct packet_struct *packet, - uint16 nb_flags, struct in_addr *release_ip) + uint16_t nb_flags, struct in_addr *release_ip) { struct nmb_packet *nmb = &packet->packet.nmb; @@ -484,7 +484,7 @@ struct response_record *queue_register_name( struct subnet_record *subrec, register_name_fail_function fail_fn, struct userdata_struct *userdata, struct nmb_name *nmbname, - uint16 nb_flags) + uint16_t nb_flags) { struct packet_struct *p; struct response_record *rrec; @@ -535,7 +535,7 @@ struct response_record *queue_register_name( struct subnet_record *subrec, void queue_wins_refresh(struct nmb_name *nmbname, response_function resp_fn, timeout_response_function timeout_fn, - uint16 nb_flags, + uint16_t nb_flags, struct in_addr refresh_ip, const char *tag) { @@ -602,7 +602,7 @@ struct response_record *queue_register_multihomed_name( struct subnet_record *su register_name_fail_function fail_fn, struct userdata_struct *userdata, struct nmb_name *nmbname, - uint16 nb_flags, + uint16_t nb_flags, struct in_addr register_ip, struct in_addr wins_ip) { @@ -660,7 +660,7 @@ struct response_record *queue_release_name( struct subnet_record *subrec, release_name_fail_function fail_fn, struct userdata_struct *userdata, struct nmb_name *nmbname, - uint16 nb_flags, + uint16_t nb_flags, struct in_addr release_ip, struct in_addr dest_ip) { diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 78b6b95f962..3e8628967c8 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -32,9 +32,9 @@ #include "nmbd/nmbd.h" struct sam_database_info { - uint32 index; - uint32 serial_lo, serial_hi; - uint32 date_lo, date_hi; + uint32_t index; + uint32_t serial_lo, serial_hi; + uint32_t date_lo, date_hi; }; /** diff --git a/source3/nmbd/nmbd_responserecordsdb.c b/source3/nmbd/nmbd_responserecordsdb.c index 78d4cc95d90..bd188509868 100644 --- a/source3/nmbd/nmbd_responserecordsdb.c +++ b/source3/nmbd/nmbd_responserecordsdb.c @@ -169,7 +169,7 @@ struct response_record *make_response_record( struct subnet_record *subrec, **************************************************************************/ static struct response_record *find_response_record_on_subnet( - struct subnet_record *subrec, uint16 id) + struct subnet_record *subrec, uint16_t id) { struct response_record *rrec = NULL; @@ -188,7 +188,7 @@ static struct response_record *find_response_record_on_subnet( **************************************************************************/ struct response_record *find_response_record(struct subnet_record **ppsubrec, - uint16 id) + uint16_t id) { struct response_record *rrec = NULL; diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c index 5b011bfc02a..1d557c45bbd 100644 --- a/source3/nmbd/nmbd_sendannounce.c +++ b/source3/nmbd/nmbd_sendannounce.c @@ -164,7 +164,7 @@ static void send_local_master_announcement(struct subnet_record *subrec, struct struct server_record *servrec) { /* Ensure we don't have the prohibited bit set. */ - uint32 type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; + uint32_t type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; DEBUG(3,("send_local_master_announcement: type %x for name %s on subnet %s for workgroup %s\n", type, lp_netbios_name(), subrec->subnet_name, work->work_group)); @@ -206,7 +206,7 @@ static void send_host_announcement(struct subnet_record *subrec, struct work_rec struct server_record *servrec) { /* Ensure we don't have the prohibited bits set. */ - uint32 type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; + uint32_t type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; DEBUG(3,("send_host_announcement: type %x for host %s on subnet %s for workgroup %s\n", type, servrec->serv.name, subrec->subnet_name, work->work_group)); @@ -229,7 +229,7 @@ static void send_lm_host_announcement(struct subnet_record *subrec, struct work_ struct server_record *servrec, int lm_interval) { /* Ensure we don't have the prohibited bits set. */ - uint32 type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; + uint32_t type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; DEBUG(3,("send_lm_host_announcement: type %x for host %s on subnet %s for workgroup %s, ttl: %d\n", type, servrec->serv.name, subrec->subnet_name, work->work_group, lm_interval)); diff --git a/source3/nmbd/nmbd_serverlistdb.c b/source3/nmbd/nmbd_serverlistdb.c index 56f400f6e32..b4057193b2f 100644 --- a/source3/nmbd/nmbd_serverlistdb.c +++ b/source3/nmbd/nmbd_serverlistdb.c @@ -183,7 +183,7 @@ void expire_servers(struct work_record *work, time_t t) out this server record from an earlier subnet. ******************************************************************/ -static uint32 write_this_server_name( struct subnet_record *subrec, +static uint32_t write_this_server_name( struct subnet_record *subrec, struct work_record *work, struct server_record *servrec) { @@ -221,7 +221,7 @@ static uint32 write_this_server_name( struct subnet_record *subrec, broadcast subnets. ******************************************************************/ -static uint32 write_this_workgroup_name( struct subnet_record *subrec, +static uint32_t write_this_workgroup_name( struct subnet_record *subrec, struct work_record *work) { struct subnet_record *ssub; @@ -253,7 +253,7 @@ static uint32 write_this_workgroup_name( struct subnet_record *subrec, Write out the browse.dat file. ******************************************************************/ -void write_browse_list_entry(XFILE *fp, const char *name, uint32 rec_type, +void write_browse_list_entry(XFILE *fp, const char *name, uint32_t rec_type, const char *local_master_browser_name, const char *description) { fstring tmp; @@ -273,7 +273,7 @@ void write_browse_list(time_t t, bool force_write) struct server_record *servrec; char *fname; char *fnamenew; - uint32 stype; + uint32_t stype; int i; XFILE *fp; bool list_changed = force_write; @@ -372,7 +372,7 @@ void write_browse_list(time_t t, bool force_write) for (work = subrec->workgrouplist; work ; work = work->next) { /* Write out a workgroup record for a workgroup. */ - uint32 wg_type = write_this_workgroup_name( subrec, work); + uint32_t wg_type = write_this_workgroup_name( subrec, work); if(wg_type) { write_browse_list_entry(fp, work->work_group, wg_type, @@ -383,7 +383,7 @@ void write_browse_list(time_t t, bool force_write) /* Now write out any server records a workgroup may have. */ for (servrec = work->serverlist; servrec ; servrec = servrec->next) { - uint32 serv_type; + uint32_t serv_type; /* We have already written our names here. */ if(is_myname(servrec->serv.name)) diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c index 6c483af26a0..5c9e4c7eb26 100644 --- a/source3/nmbd/nmbd_subnetdb.c +++ b/source3/nmbd/nmbd_subnetdb.c @@ -37,7 +37,7 @@ struct subnet_record *unicast_subnet = NULL; struct subnet_record *remote_broadcast_subnet = NULL; struct subnet_record *wins_server_subnet = NULL; -extern uint16 samba_nb_type; /* Samba's NetBIOS name type. */ +extern uint16_t samba_nb_type; /* Samba's NetBIOS name type. */ /**************************************************************************** Add a subnet into the list. diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c index 70c1750422a..0135afc2f0a 100644 --- a/source3/nmbd/nmbd_synclists.c +++ b/source3/nmbd/nmbd_synclists.c @@ -52,7 +52,7 @@ static XFILE *fp; Note sname and comment are in UNIX codepage format. ******************************************************************/ -static void callback(const char *sname, uint32 stype, +static void callback(const char *sname, uint32_t stype, const char *comment, void *state) { x_fprintf(fp,"\"%s\" %08X \"%s\"\n", sname, stype, comment); @@ -71,7 +71,7 @@ static void sync_child(char *name, int nm_type, { fstring unix_workgroup; struct cli_state *cli; - uint32 local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0; + uint32_t local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0; struct sockaddr_storage ss; NTSTATUS status; @@ -190,7 +190,7 @@ done: **********************************************************************/ static void complete_one(struct sync_record *s, - char *sname, uint32 stype, char *comment) + char *sname, uint32_t stype, char *comment) { struct work_record *work; struct server_record *servrec; diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c index 66725fc9b96..773e195ff4e 100644 --- a/source3/nmbd/nmbd_winsproxy.c +++ b/source3/nmbd/nmbd_winsproxy.c @@ -34,7 +34,7 @@ static void wins_proxy_name_query_request_success( struct subnet_record *subrec, struct packet_struct *original_packet; struct subnet_record *orig_broadcast_subnet; struct name_record *namerec = NULL; - uint16 nb_flags; + uint16_t nb_flags; int num_ips; int i; int ttl = 3600; /* By default one hour in the cache. */ diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index bf32dbda43f..98ec6250987 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -81,13 +81,13 @@ static void wins_delete_all_1b_in_memory_records(void) static struct name_record *wins_record_to_name_record(TDB_DATA key, TDB_DATA data) { struct name_record *namerec = NULL; - uint16 nb_flags; + uint16_t nb_flags; unsigned char nr_src; - uint32 death_time, refresh_time; - uint32 id_low, id_high; - uint32 saddr; - uint32 wins_flags; - uint32 num_ips; + uint32_t death_time, refresh_time; + uint32_t id_low, id_high; + uint32_t saddr; + uint32_t wins_flags; + uint32_t num_ips; size_t len; int i; @@ -167,15 +167,15 @@ static TDB_DATA name_record_to_wins_record(const struct name_record *namerec) TDB_DATA data; size_t len = 0; int i; - uint32 id_low = (namerec->data.id & 0xFFFFFFFF); - uint32 id_high = (namerec->data.id >> 32) & 0xFFFFFFFF; + uint32_t id_low = (namerec->data.id & 0xFFFFFFFF); + uint32_t id_high = (namerec->data.id >> 32) & 0xFFFFFFFF; ZERO_STRUCT(data); len = (2 + 1 + (7*4)); /* "wbddddddd" */ len += (namerec->data.num_ips * 4); - data.dptr = (uint8 *)SMB_MALLOC(len); + data.dptr = (uint8_t *)SMB_MALLOC(len); if (!data.dptr) { return data; } @@ -184,13 +184,13 @@ static TDB_DATA name_record_to_wins_record(const struct name_record *namerec) len = tdb_pack(data.dptr, data.dsize, "wbddddddd", namerec->data.nb_flags, (unsigned char)namerec->data.source, - (uint32)namerec->data.death_time, - (uint32)namerec->data.refresh_time, + (uint32_t)namerec->data.death_time, + (uint32_t)namerec->data.refresh_time, id_low, id_high, - (uint32)namerec->data.wins_ip.s_addr, - (uint32)namerec->data.wins_flags, - (uint32)namerec->data.num_ips ); + (uint32_t)namerec->data.wins_ip.s_addr, + (uint32_t)namerec->data.wins_flags, + (uint32_t)namerec->data.num_ips ); for (i = 0; i < namerec->data.num_ips; i++) { SIVAL(data.dptr, len + (i*4), namerec->data.ip[i].s_addr); @@ -213,7 +213,7 @@ static TDB_DATA name_to_key(const struct nmb_name *nmbname) pull_ascii_nstring(keydata, sizeof(unstring), nmbname->name); (void)strupper_m(keydata); keydata[sizeof(unstring)] = nmbname->name_type; - key.dptr = (uint8 *)keydata; + key.dptr = (uint8_t *)keydata; key.dsize = sizeof(keydata); return key; @@ -862,7 +862,7 @@ void wins_process_name_refresh_request( struct subnet_record *subrec, struct nmb_packet *nmb = &p->packet.nmb; struct nmb_name *question = &nmb->question.question_name; bool bcast = nmb->header.nm_flags.bcast; - uint16 nb_flags = get_nb_flags(nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(nmb->additional->rdata); bool group = (nb_flags & NB_GROUP) ? True : False; struct name_record *namerec = NULL; int ttl = get_ttl_from_packet(nmb); @@ -1169,7 +1169,7 @@ void wins_process_name_registration_request(struct subnet_record *subrec, struct nmb_packet *nmb = &p->packet.nmb; struct nmb_name *question = &nmb->question.question_name; bool bcast = nmb->header.nm_flags.bcast; - uint16 nb_flags = get_nb_flags(nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(nmb->additional->rdata); int ttl = get_ttl_from_packet(nmb); struct name_record *namerec = NULL; struct in_addr from_ip; @@ -1619,7 +1619,7 @@ void wins_process_multihomed_name_registration_request( struct subnet_record *su struct nmb_packet *nmb = &p->packet.nmb; struct nmb_name *question = &nmb->question.question_name; bool bcast = nmb->header.nm_flags.bcast; - uint16 nb_flags = get_nb_flags(nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(nmb->additional->rdata); int ttl = get_ttl_from_packet(nmb); struct name_record *namerec = NULL; struct in_addr from_ip; @@ -2147,7 +2147,7 @@ void wins_process_name_release_request(struct subnet_record *subrec, struct nmb_packet *nmb = &p->packet.nmb; struct nmb_name *question = &nmb->question.question_name; bool bcast = nmb->header.nm_flags.bcast; - uint16 nb_flags = get_nb_flags(nmb->additional->rdata); + uint16_t nb_flags = get_nb_flags(nmb->additional->rdata); struct name_record *namerec = NULL; struct in_addr from_ip; bool releasing_group_name = (nb_flags & NB_GROUP) ? True : False; diff --git a/source3/nmbd/nmbd_workgroupdb.c b/source3/nmbd/nmbd_workgroupdb.c index 4e72b8128b9..5f52a74106e 100644 --- a/source3/nmbd/nmbd_workgroupdb.c +++ b/source3/nmbd/nmbd_workgroupdb.c @@ -24,7 +24,7 @@ #include "../librpc/gen_ndr/svcctl.h" #include "nmbd/nmbd.h" -extern uint16 samba_nb_type; +extern uint16_t samba_nb_type; int workgroup_count = 0; /* unique index key: one for each workgroup */ -- 2.11.4.GIT