diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/addns/dns.h | 100 | ||||
-rw-r--r-- | lib/addns/dnserr.h | 4 | ||||
-rw-r--r-- | lib/addns/dnsgss.c | 6 | ||||
-rw-r--r-- | lib/addns/dnsmarshall.c | 56 | ||||
-rw-r--r-- | lib/addns/dnsrecord.c | 40 | ||||
-rw-r--r-- | lib/addns/dnssock.c | 18 |
6 files changed, 112 insertions, 112 deletions
diff --git a/lib/addns/dns.h b/lib/addns/dns.h index c0820fe0bd..22299c525a 100644 --- a/lib/addns/dns.h +++ b/lib/addns/dns.h @@ -236,8 +236,8 @@ struct dns_domain_name { struct dns_question { struct dns_domain_name *name; - uint16 q_type; - uint16 q_class; + uint16_t q_type; + uint16_t q_class; }; /* @@ -248,36 +248,36 @@ struct dns_question { struct dns_zone { struct dns_domain_name *name; - uint16 z_type; - uint16 z_class; + uint16_t z_type; + uint16_t z_class; }; struct dns_rrec { struct dns_domain_name *name; - uint16 type; - uint16 r_class; - uint32 ttl; - uint16 data_length; - uint8 *data; + uint16_t type; + uint16_t r_class; + uint32_t ttl; + uint16_t data_length; + uint8_t *data; }; struct dns_tkey_record { struct dns_domain_name *algorithm; time_t inception; time_t expiration; - uint16 mode; - uint16 error; - uint16 key_length; - uint8 *key; + uint16_t mode; + uint16_t error; + uint16_t key_length; + uint8_t *key; }; struct dns_request { - uint16 id; - uint16 flags; - uint16 num_questions; - uint16 num_answers; - uint16 num_auths; - uint16 num_additionals; + uint16_t id; + uint16_t flags; + uint16_t num_questions; + uint16_t num_answers; + uint16_t num_auths; + uint16_t num_additionals; struct dns_question **questions; struct dns_rrec **answers; struct dns_rrec **auths; @@ -291,12 +291,12 @@ struct dns_request { */ struct dns_update_request { - uint16 id; - uint16 flags; - uint16 num_zones; - uint16 num_preqs; - uint16 num_updates; - uint16 num_additionals; + uint16_t id; + uint16_t flags; + uint16_t num_zones; + uint16_t num_preqs; + uint16_t num_updates; + uint16_t num_additionals; struct dns_zone **zones; struct dns_rrec **preqs; struct dns_rrec **updates; @@ -304,13 +304,13 @@ struct dns_update_request { }; struct dns_connection { - int32 hType; + int32_t hType; int s; struct sockaddr RecvAddr; }; struct dns_buffer { - uint8 *data; + uint8_t *data; size_t size; size_t offset; DNS_ERROR error; @@ -326,7 +326,7 @@ char *dns_generate_keyname( TALLOC_CTX *mem_ctx ); /* from dnsrecord.c */ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name, - uint16 q_type, uint16 q_class, + uint16_t q_type, uint16_t q_class, struct dns_request **preq ); DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name, struct dns_update_request **preq ); @@ -335,42 +335,42 @@ DNS_ERROR dns_create_probe(TALLOC_CTX *mem_ctx, const char *zone, const struct sockaddr_storage *sslist, struct dns_update_request **preq); DNS_ERROR dns_create_rrec(TALLOC_CTX *mem_ctx, const char *name, - uint16 type, uint16 r_class, uint32 ttl, - uint16 data_length, uint8 *data, + uint16_t type, uint16_t r_class, uint32_t ttl, + uint16_t data_length, uint8_t *data, struct dns_rrec **prec); DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, - uint16 *num_records, struct dns_rrec ***records); + uint16_t *num_records, struct dns_rrec ***records); DNS_ERROR dns_create_tkey_record(TALLOC_CTX *mem_ctx, const char *keyname, const char *algorithm_name, time_t inception, - time_t expiration, uint16 mode, uint16 error, - uint16 key_length, const uint8 *key, + time_t expiration, uint16_t mode, uint16_t error, + uint16_t key_length, const uint8_t *key, struct dns_rrec **prec); DNS_ERROR dns_create_name_in_use_record(TALLOC_CTX *mem_ctx, const char *name, const struct sockaddr_storage *ip, struct dns_rrec **prec); DNS_ERROR dns_create_delete_record(TALLOC_CTX *mem_ctx, const char *name, - uint16 type, uint16 r_class, + uint16_t type, uint16_t r_class, struct dns_rrec **prec); DNS_ERROR dns_create_name_not_in_use_record(TALLOC_CTX *mem_ctx, - const char *name, uint32 type, + const char *name, uint32_t type, struct dns_rrec **prec); DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, - uint32 ttl, const struct sockaddr_storage *pss, + uint32_t ttl, const struct sockaddr_storage *pss, struct dns_rrec **prec); DNS_ERROR dns_create_aaaa_record(TALLOC_CTX *mem_ctx, const char *host, - uint32 ttl, const struct sockaddr_storage *pss, + uint32_t ttl, const struct sockaddr_storage *pss, struct dns_rrec **prec); DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, struct dns_tkey_record **ptkey); DNS_ERROR dns_create_tsig_record(TALLOC_CTX *mem_ctx, const char *keyname, const char *algorithm_name, - time_t time_signed, uint16 fudge, - uint16 mac_length, const uint8 *mac, - uint16 original_id, uint16 error, + time_t time_signed, uint16_t fudge, + uint16_t mac_length, const uint8_t *mac, + uint16_t original_id, uint16_t error, struct dns_rrec **prec); DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, - uint16 *num_records, struct dns_rrec ***records); + uint16_t *num_records, struct dns_rrec ***records); DNS_ERROR dns_create_update_request(TALLOC_CTX *mem_ctx, const char *domainname, const char *hostname, @@ -380,7 +380,7 @@ DNS_ERROR dns_create_update_request(TALLOC_CTX *mem_ctx, /* from dnssock.c */ -DNS_ERROR dns_open_connection( const char *nameserver, int32 dwType, +DNS_ERROR dns_open_connection( const char *nameserver, int32_t dwType, TALLOC_CTX *mem_ctx, struct dns_connection **conn ); DNS_ERROR dns_send(struct dns_connection *conn, const struct dns_buffer *buf); @@ -397,14 +397,14 @@ DNS_ERROR dns_update_transaction(TALLOC_CTX *mem_ctx, /* from dnsmarshall.c */ struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx); -void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data, +void dns_marshall_buffer(struct dns_buffer *buf, const uint8_t *data, size_t len); -void dns_marshall_uint16(struct dns_buffer *buf, uint16 val); -void dns_marshall_uint32(struct dns_buffer *buf, uint32 val); -void dns_unmarshall_buffer(struct dns_buffer *buf, uint8 *data, +void dns_marshall_uint16(struct dns_buffer *buf, uint16_t val); +void dns_marshall_uint32(struct dns_buffer *buf, uint32_t val); +void dns_unmarshall_buffer(struct dns_buffer *buf, uint8_t *data, size_t len); -void dns_unmarshall_uint16(struct dns_buffer *buf, uint16 *val); -void dns_unmarshall_uint32(struct dns_buffer *buf, uint32 *val); +void dns_unmarshall_uint16(struct dns_buffer *buf, uint16_t *val); +void dns_unmarshall_uint32(struct dns_buffer *buf, uint32_t *val); void dns_unmarshall_domain_name(TALLOC_CTX *mem_ctx, struct dns_buffer *buf, struct dns_domain_name **pname); @@ -427,7 +427,7 @@ DNS_ERROR dns_unmarshall_update_request(TALLOC_CTX *mem_ctx, struct dns_update_request **pupreq); struct dns_request *dns_update2request(struct dns_update_request *update); struct dns_update_request *dns_request2update(struct dns_request *request); -uint16 dns_response_code(uint16 flags); +uint16_t dns_response_code(uint16_t flags); const char *dns_errstr(DNS_ERROR err); /* from dnsgss.c */ @@ -444,7 +444,7 @@ DNS_ERROR dns_sign_update(struct dns_update_request *req, gss_ctx_id_t gss_ctx, const char *keyname, const char *algorithmname, - time_t time_signed, uint16 fudge); + time_t time_signed, uint16_t fudge); #endif /* HAVE_GSSAPI */ diff --git a/lib/addns/dnserr.h b/lib/addns/dnserr.h index 8638a2d434..1eedc8f93f 100644 --- a/lib/addns/dnserr.h +++ b/lib/addns/dnserr.h @@ -36,11 +36,11 @@ /* Setup the DNS_ERROR typedef. Technique takes from nt_status.h */ #if defined(HAVE_IMMEDIATE_STRUCTURES) -typedef struct {uint32 v;} DNS_ERROR; +typedef struct {uint32_t v;} DNS_ERROR; #define ERROR_DNS(x) ((DNS_ERROR) { x }) #define ERROR_DNS_V(x) ((x).v) #else -typedef uint32 DNS_ERROR; +typedef uint32_t DNS_ERROR; #define ERROR_DNS(x) (x) #define ERROR_DNS_V(x) (x) #endif diff --git a/lib/addns/dnsgss.c b/lib/addns/dnsgss.c index 4f7571f87d..64a7d859a0 100644 --- a/lib/addns/dnsgss.c +++ b/lib/addns/dnsgss.c @@ -125,7 +125,7 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx, err = dns_create_tkey_record( req, keyname, "gss.microsoft.com", t, t + 86400, DNS_TKEY_MODE_GSSAPI, 0, - output_desc.length, (uint8 *)output_desc.value, + output_desc.length, (uint8_t *)output_desc.value, &rec ); if (!ERR_DNS_IS_OK(err)) goto error; @@ -272,7 +272,7 @@ DNS_ERROR dns_sign_update(struct dns_update_request *req, gss_ctx_id_t gss_ctx, const char *keyname, const char *algorithmname, - time_t time_signed, uint16 fudge) + time_t time_signed, uint16_t fudge) { struct dns_buffer *buf; DNS_ERROR err; @@ -319,7 +319,7 @@ DNS_ERROR dns_sign_update(struct dns_update_request *req, } err = dns_create_tsig_record(buf, keyname, algorithmname, time_signed, - fudge, mic.length, (uint8 *)mic.value, + fudge, mic.length, (uint8_t *)mic.value, req->id, 0, &rec); gss_release_buffer(&minor, &mic); if (!ERR_DNS_IS_OK(err)) goto error; diff --git a/lib/addns/dnsmarshall.c b/lib/addns/dnsmarshall.c index 59d6470f34..b0211c8a40 100644 --- a/lib/addns/dnsmarshall.c +++ b/lib/addns/dnsmarshall.c @@ -39,7 +39,7 @@ struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx) */ result->size = 2; - if (!(result->data = talloc_array(result, uint8, result->size))) { + if (!(result->data = talloc_array(result, uint8_t, result->size))) { TALLOC_FREE(result); return NULL; } @@ -47,7 +47,7 @@ struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx) return result; } -void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data, +void dns_marshall_buffer(struct dns_buffer *buf, const uint8_t *data, size_t len) { if (!ERR_DNS_IS_OK(buf->error)) return; @@ -70,7 +70,7 @@ void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data, if (buf->offset + len > buf->size) { size_t new_size = buf->offset + len; - uint8 *new_data; + uint8_t *new_data; /* * Don't do too many reallocs, round up to some multiple @@ -78,7 +78,7 @@ void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data, new_size += (64 - (new_size % 64)); - if (!(new_data = talloc_realloc(buf, buf->data, uint8, + if (!(new_data = talloc_realloc(buf, buf->data, uint8_t, new_size))) { buf->error = ERROR_DNS_NO_MEMORY; return; @@ -93,19 +93,19 @@ void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data, return; } -void dns_marshall_uint16(struct dns_buffer *buf, uint16 val) +void dns_marshall_uint16(struct dns_buffer *buf, uint16_t val) { - uint16 n_val = htons(val); - dns_marshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val)); + uint16_t n_val = htons(val); + dns_marshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); } -void dns_marshall_uint32(struct dns_buffer *buf, uint32 val) +void dns_marshall_uint32(struct dns_buffer *buf, uint32_t val) { - uint32 n_val = htonl(val); - dns_marshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val)); + uint32_t n_val = htonl(val); + dns_marshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); } -void dns_unmarshall_buffer(struct dns_buffer *buf, uint8 *data, +void dns_unmarshall_buffer(struct dns_buffer *buf, uint8_t *data, size_t len) { if (!(ERR_DNS_IS_OK(buf->error))) return; @@ -121,21 +121,21 @@ void dns_unmarshall_buffer(struct dns_buffer *buf, uint8 *data, return; } -void dns_unmarshall_uint16(struct dns_buffer *buf, uint16 *val) +void dns_unmarshall_uint16(struct dns_buffer *buf, uint16_t *val) { - uint16 n_val; + uint16_t n_val; - dns_unmarshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val)); + dns_unmarshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); if (!(ERR_DNS_IS_OK(buf->error))) return; *val = ntohs(n_val); } -void dns_unmarshall_uint32(struct dns_buffer *buf, uint32 *val) +void dns_unmarshall_uint32(struct dns_buffer *buf, uint32_t *val) { - uint32 n_val; + uint32_t n_val; - dns_unmarshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val)); + dns_unmarshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); if (!(ERR_DNS_IS_OK(buf->error))) return; *val = ntohl(n_val); @@ -152,16 +152,16 @@ void dns_marshall_domain_name(struct dns_buffer *buf, */ for (label = name->pLabelList; label != NULL; label = label->next) { - uint8 len = label->len; + uint8_t len = label->len; - dns_marshall_buffer(buf, (uint8 *)&len, sizeof(len)); + dns_marshall_buffer(buf, (uint8_t *)&len, sizeof(len)); if (!ERR_DNS_IS_OK(buf->error)) return; - dns_marshall_buffer(buf, (uint8 *)label->label, len); + dns_marshall_buffer(buf, (uint8_t *)label->label, len); if (!ERR_DNS_IS_OK(buf->error)) return; } - dns_marshall_buffer(buf, (uint8 *)&end_char, 1); + dns_marshall_buffer(buf, (uint8_t *)&end_char, 1); } static void dns_unmarshall_label(TALLOC_CTX *mem_ctx, @@ -170,7 +170,7 @@ static void dns_unmarshall_label(TALLOC_CTX *mem_ctx, struct dns_domain_label **plabel) { struct dns_domain_label *label; - uint8 len; + uint8_t len; if (!ERR_DNS_IS_OK(buf->error)) return; @@ -196,7 +196,7 @@ static void dns_unmarshall_label(TALLOC_CTX *mem_ctx, * and using the calculated offset. */ struct dns_buffer new_buf; - uint8 low; + uint8_t low; dns_unmarshall_buffer(buf, &low, sizeof(low)); if (!ERR_DNS_IS_OK(buf->error)) return; @@ -228,7 +228,7 @@ static void dns_unmarshall_label(TALLOC_CTX *mem_ctx, goto error; } - dns_unmarshall_buffer(buf, (uint8 *)label->label, len); + dns_unmarshall_buffer(buf, (uint8_t *)label->label, len); if (!ERR_DNS_IS_OK(buf->error)) goto error; dns_unmarshall_label(label, level+1, buf, &label->next); @@ -329,7 +329,7 @@ static void dns_unmarshall_rr(TALLOC_CTX *mem_ctx, if (!(ERR_DNS_IS_OK(buf->error))) return; if (r->data_length != 0) { - if (!(r->data = talloc_array(r, uint8, r->data_length))) { + if (!(r->data = talloc_array(r, uint8_t, r->data_length))) { buf->error = ERROR_DNS_NO_MEMORY; return; } @@ -346,7 +346,7 @@ DNS_ERROR dns_marshall_request(TALLOC_CTX *mem_ctx, struct dns_buffer **pbuf) { struct dns_buffer *buf; - uint16 i; + uint16_t i; if (!(buf = dns_create_buffer(mem_ctx))) { return ERROR_DNS_NO_MEMORY; @@ -387,7 +387,7 @@ DNS_ERROR dns_unmarshall_request(TALLOC_CTX *mem_ctx, struct dns_request **preq) { struct dns_request *req; - uint16 i; + uint16_t i; DNS_ERROR err; if (!(req = talloc_zero(mem_ctx, struct dns_request))) { @@ -524,7 +524,7 @@ DNS_ERROR dns_unmarshall_update_request(TALLOC_CTX *mem_ctx, (struct dns_request **)(void *)pupreq); } -uint16 dns_response_code(uint16 flags) +uint16_t dns_response_code(uint16_t flags) { return flags & 0xF; } diff --git a/lib/addns/dnsrecord.c b/lib/addns/dnsrecord.c index e5a43b887c..724d0dfd8f 100644 --- a/lib/addns/dnsrecord.c +++ b/lib/addns/dnsrecord.c @@ -24,7 +24,7 @@ #include "dns.h" DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name, - uint16 q_type, uint16 q_class, + uint16_t q_type, uint16_t q_class, struct dns_request **preq ) { struct dns_request *req = NULL; @@ -91,8 +91,8 @@ DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name, } DNS_ERROR dns_create_rrec(TALLOC_CTX *mem_ctx, const char *name, - uint16 type, uint16 r_class, uint32 ttl, - uint16 data_length, uint8 *data, + uint16_t type, uint16_t r_class, uint32_t ttl, + uint16_t data_length, uint8_t *data, struct dns_rrec **prec) { struct dns_rrec *rec = NULL; @@ -119,10 +119,10 @@ DNS_ERROR dns_create_rrec(TALLOC_CTX *mem_ctx, const char *name, } DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, - uint32 ttl, const struct sockaddr_storage *pss, + uint32_t ttl, const struct sockaddr_storage *pss, struct dns_rrec **prec) { - uint8 *data; + uint8_t *data; DNS_ERROR err; struct in_addr ip; @@ -131,7 +131,7 @@ DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, } ip = ((const struct sockaddr_in *)pss)->sin_addr; - if (!(data = (uint8 *)talloc_memdup(mem_ctx, (const void *)&ip.s_addr, + if (!(data = (uint8_t *)talloc_memdup(mem_ctx, (const void *)&ip.s_addr, sizeof(ip.s_addr)))) { return ERROR_DNS_NO_MEMORY; } @@ -147,11 +147,11 @@ DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, } DNS_ERROR dns_create_aaaa_record(TALLOC_CTX *mem_ctx, const char *host, - uint32 ttl, const struct sockaddr_storage *pss, + uint32_t ttl, const struct sockaddr_storage *pss, struct dns_rrec **prec) { #ifdef HAVE_IPV6 - uint8 *data; + uint8_t *data; DNS_ERROR err; struct in6_addr ip6; @@ -160,7 +160,7 @@ DNS_ERROR dns_create_aaaa_record(TALLOC_CTX *mem_ctx, const char *host, } ip6 = ((const struct sockaddr_in6 *)pss)->sin6_addr; - if (!(data = (uint8 *)talloc_memdup(mem_ctx, (const void *)&ip6.s6_addr, + if (!(data = (uint8_t *)talloc_memdup(mem_ctx, (const void *)&ip6.s6_addr, sizeof(ip6.s6_addr)))) { return ERROR_DNS_NO_MEMORY; } @@ -201,7 +201,7 @@ DNS_ERROR dns_create_name_in_use_record(TALLOC_CTX *mem_ctx, } DNS_ERROR dns_create_name_not_in_use_record(TALLOC_CTX *mem_ctx, - const char *name, uint32 type, + const char *name, uint32_t type, struct dns_rrec **prec) { return dns_create_rrec(mem_ctx, name, type, DNS_CLASS_NONE, 0, @@ -209,7 +209,7 @@ DNS_ERROR dns_create_name_not_in_use_record(TALLOC_CTX *mem_ctx, } DNS_ERROR dns_create_delete_record(TALLOC_CTX *mem_ctx, const char *name, - uint16 type, uint16 r_class, + uint16_t type, uint16_t r_class, struct dns_rrec **prec) { return dns_create_rrec(mem_ctx, name, type, r_class, 0, 0, NULL, prec); @@ -217,8 +217,8 @@ DNS_ERROR dns_create_delete_record(TALLOC_CTX *mem_ctx, const char *name, DNS_ERROR dns_create_tkey_record(TALLOC_CTX *mem_ctx, const char *keyname, const char *algorithm_name, time_t inception, - time_t expiration, uint16 mode, uint16 error, - uint16 key_length, const uint8 *key, + time_t expiration, uint16_t mode, uint16_t error, + uint16_t key_length, const uint8_t *key, struct dns_rrec **prec) { struct dns_buffer *buf = NULL; @@ -259,7 +259,7 @@ DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, { struct dns_tkey_record *tkey; struct dns_buffer buf; - uint32 tmp_inception, tmp_expiration; + uint32_t tmp_inception, tmp_expiration; if (!(tkey = talloc(mem_ctx, struct dns_tkey_record))) { return ERROR_DNS_NO_MEMORY; @@ -280,7 +280,7 @@ DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, if (!ERR_DNS_IS_OK(buf.error)) goto error; if (tkey->key_length) { - if (!(tkey->key = talloc_array(tkey, uint8, tkey->key_length))) { + if (!(tkey->key = talloc_array(tkey, uint8_t, tkey->key_length))) { buf.error = ERROR_DNS_NO_MEMORY; goto error; } @@ -304,9 +304,9 @@ DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, DNS_ERROR dns_create_tsig_record(TALLOC_CTX *mem_ctx, const char *keyname, const char *algorithm_name, - time_t time_signed, uint16 fudge, - uint16 mac_length, const uint8 *mac, - uint16 original_id, uint16 error, + time_t time_signed, uint16_t fudge, + uint16_t mac_length, const uint8_t *mac, + uint16_t original_id, uint16_t error, struct dns_rrec **prec) { struct dns_buffer *buf = NULL; @@ -344,7 +344,7 @@ DNS_ERROR dns_create_tsig_record(TALLOC_CTX *mem_ctx, const char *keyname, } DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, - uint16 *num_records, struct dns_rrec ***records) + uint16_t *num_records, struct dns_rrec ***records) { struct dns_rrec **new_records; @@ -374,7 +374,7 @@ DNS_ERROR dns_create_probe(TALLOC_CTX *mem_ctx, const char *zone, struct dns_update_request *req = NULL; struct dns_rrec *rec = NULL; DNS_ERROR err; - uint16 i; + uint16_t i; err = dns_create_update(mem_ctx, zone, &req); if (!ERR_DNS_IS_OK(err)) return err; diff --git a/lib/addns/dnssock.c b/lib/addns/dnssock.c index 9e769097ba..5f99519135 100644 --- a/lib/addns/dnssock.c +++ b/lib/addns/dnssock.c @@ -135,7 +135,7 @@ static DNS_ERROR dns_udp_open( const char *nameserver, /******************************************************************** ********************************************************************/ -DNS_ERROR dns_open_connection( const char *nameserver, int32 dwType, +DNS_ERROR dns_open_connection( const char *nameserver, int32_t dwType, TALLOC_CTX *mem_ctx, struct dns_connection **conn ) { @@ -149,7 +149,7 @@ DNS_ERROR dns_open_connection( const char *nameserver, int32 dwType, return ERROR_DNS_INVALID_PARAMETER; } -static DNS_ERROR write_all(int fd, uint8 *data, size_t len) +static DNS_ERROR write_all(int fd, uint8_t *data, size_t len) { size_t total = 0; @@ -173,10 +173,10 @@ static DNS_ERROR write_all(int fd, uint8 *data, size_t len) static DNS_ERROR dns_send_tcp(struct dns_connection *conn, const struct dns_buffer *buf) { - uint16 len = htons(buf->offset); + uint16_t len = htons(buf->offset); DNS_ERROR err; - err = write_all(conn->s, (uint8 *)&len, sizeof(len)); + err = write_all(conn->s, (uint8_t *)&len, sizeof(len)); if (!ERR_DNS_IS_OK(err)) return err; return write_all(conn->s, buf->data, buf->offset); @@ -211,7 +211,7 @@ DNS_ERROR dns_send(struct dns_connection *conn, const struct dns_buffer *buf) return ERROR_DNS_INVALID_PARAMETER; } -static DNS_ERROR read_all(int fd, uint8 *data, size_t len) +static DNS_ERROR read_all(int fd, uint8_t *data, size_t len) { size_t total = 0; @@ -248,13 +248,13 @@ static DNS_ERROR dns_receive_tcp(TALLOC_CTX *mem_ctx, { struct dns_buffer *buf; DNS_ERROR err; - uint16 len; + uint16_t len; if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) { return ERROR_DNS_NO_MEMORY; } - err = read_all(conn->s, (uint8 *)&len, sizeof(len)); + err = read_all(conn->s, (uint8_t *)&len, sizeof(len)); if (!ERR_DNS_IS_OK(err)) { return err; } @@ -262,7 +262,7 @@ static DNS_ERROR dns_receive_tcp(TALLOC_CTX *mem_ctx, buf->size = ntohs(len); if (buf->size) { - if (!(buf->data = talloc_array(buf, uint8, buf->size))) { + if (!(buf->data = talloc_array(buf, uint8_t, buf->size))) { TALLOC_FREE(buf); return ERROR_DNS_NO_MEMORY; } @@ -295,7 +295,7 @@ static DNS_ERROR dns_receive_udp(TALLOC_CTX *mem_ctx, * UDP based DNS can only be 512 bytes */ - if (!(buf->data = talloc_array(buf, uint8, 512))) { + if (!(buf->data = talloc_array(buf, uint8_t, 512))) { TALLOC_FREE(buf); return ERROR_DNS_NO_MEMORY; } |