Changeset b7fd2a0 in mainline for uspace/srv/net/dnsrsrv/dns_msg.c
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dnsrsrv/dns_msg.c
r36f0738 rb7fd2a0 56 56 * fit in and append @a suff. 57 57 */ 58 static int dns_dstr_ext(char **dstr, const char *suff)58 static errno_t dns_dstr_ext(char **dstr, const char *suff) 59 59 { 60 60 size_t s1, s2; … … 93 93 * @param act_size Place to store actual encoded size 94 94 */ 95 static int dns_name_encode(char *name, uint8_t *buf, size_t buf_size,95 static errno_t dns_name_encode(char *name, uint8_t *buf, size_t buf_size, 96 96 size_t *act_size) 97 97 { … … 158 158 * @param eoff Place to store end offset (offset after last decoded byte) 159 159 */ 160 int dns_name_decode(dns_pdu_t *pdu, size_t boff, char **rname,160 errno_t dns_name_decode(dns_pdu_t *pdu, size_t boff, char **rname, 161 161 size_t *eoff) 162 162 { … … 169 169 char *name; 170 170 char dbuf[2]; 171 int rc;171 errno_t rc; 172 172 bool first; 173 173 … … 325 325 * @param act_size Place to store actual encoded size 326 326 */ 327 static int dns_question_encode(dns_question_t *question, uint8_t *buf,327 static errno_t dns_question_encode(dns_question_t *question, uint8_t *buf, 328 328 size_t buf_size, size_t *act_size) 329 329 { 330 330 size_t name_size; 331 331 size_t di; 332 int rc;332 errno_t rc; 333 333 334 334 rc = dns_name_encode(question->qname, buf, buf_size, &name_size); … … 358 358 * @param eoff Place to store end offset (offset after last decoded byte) 359 359 */ 360 static int dns_question_decode(dns_pdu_t *pdu, size_t boff,360 static errno_t dns_question_decode(dns_pdu_t *pdu, size_t boff, 361 361 dns_question_t **rquestion, size_t *eoff) 362 362 { 363 363 dns_question_t *question; 364 364 size_t name_eoff; 365 int rc;365 errno_t rc; 366 366 367 367 question = calloc(1, sizeof (dns_question_t)); … … 398 398 * @param eoff Place to store end offset (offset after last decoded byte) 399 399 */ 400 static int dns_rr_decode(dns_pdu_t *pdu, size_t boff, dns_rr_t **retrr,400 static errno_t dns_rr_decode(dns_pdu_t *pdu, size_t boff, dns_rr_t **retrr, 401 401 size_t *eoff) 402 402 { … … 406 406 size_t bsz; 407 407 size_t rdlength; 408 int rc;408 errno_t rc; 409 409 410 410 rr = calloc(1, sizeof(dns_rr_t)); … … 492 492 * ENOMEM if out of memory 493 493 */ 494 int dns_message_encode(dns_message_t *msg, void **rdata, size_t *rsize)494 errno_t dns_message_encode(dns_message_t *msg, void **rdata, size_t *rsize) 495 495 { 496 496 uint8_t *data; … … 499 499 size_t q_size = 0; 500 500 size_t di; 501 int rc;501 errno_t rc; 502 502 503 503 hdr.id = host2uint16_t_be(msg->id); … … 564 564 * ENOMEM if out of memory 565 565 */ 566 int dns_message_decode(void *data, size_t size, dns_message_t **rmsg)566 errno_t dns_message_decode(void *data, size_t size, dns_message_t **rmsg) 567 567 { 568 568 dns_message_t *msg; … … 575 575 size_t an_count; 576 576 size_t i; 577 int rc;577 errno_t rc; 578 578 579 579 msg = dns_message_new();
Note:
See TracChangeset
for help on using the changeset viewer.