Changes in uspace/srv/net/dhcp/dhcp.c [c1694b6b:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dhcp/dhcp.c
rc1694b6b rb7fd2a0 117 117 118 118 /** Decode subnet mask into subnet prefix length. */ 119 static int subnet_mask_decode(uint32_t mask, int *bits)119 static errno_t subnet_mask_decode(uint32_t mask, int *bits) 120 120 { 121 121 int zbits; … … 148 148 } 149 149 150 static int dhcp_send_discover(dhcp_link_t *dlink)150 static errno_t dhcp_send_discover(dhcp_link_t *dlink) 151 151 { 152 152 dhcp_hdr_t *hdr = (dhcp_hdr_t *)msgbuf; … … 171 171 } 172 172 173 static int dhcp_send_request(dhcp_link_t *dlink, dhcp_offer_t *offer)173 static errno_t dhcp_send_request(dhcp_link_t *dlink, dhcp_offer_t *offer) 174 174 { 175 175 dhcp_hdr_t *hdr = (dhcp_hdr_t *)msgbuf; … … 212 212 } 213 213 214 static int dhcp_parse_reply(void *msg, size_t size, dhcp_offer_t *offer)214 static errno_t dhcp_parse_reply(void *msg, size_t size, dhcp_offer_t *offer) 215 215 { 216 216 dhcp_hdr_t *hdr = (dhcp_hdr_t *)msg; … … 225 225 uint8_t opt_type, opt_len; 226 226 uint8_t *msgb; 227 int rc;227 errno_t rc; 228 228 size_t i; 229 229 … … 360 360 } 361 361 362 static int dhcp_cfg_create(service_id_t iplink, dhcp_offer_t *offer)363 { 364 int rc;362 static errno_t dhcp_cfg_create(service_id_t iplink, dhcp_offer_t *offer) 363 { 364 errno_t rc; 365 365 service_id_t addr_id; 366 366 service_id_t sroute_id; … … 420 420 } 421 421 422 static int dhcp_discover_proc(dhcp_link_t *dlink)422 static errno_t dhcp_discover_proc(dhcp_link_t *dlink) 423 423 { 424 424 dlink->state = ds_selecting; 425 425 426 int rc = dhcp_send_discover(dlink);426 errno_t rc = dhcp_send_discover(dlink); 427 427 if (rc != EOK) 428 428 return EIO; … … 438 438 } 439 439 440 int dhcpsrv_link_add(service_id_t link_id)440 errno_t dhcpsrv_link_add(service_id_t link_id) 441 441 { 442 442 dhcp_link_t *dlink; 443 int rc;443 errno_t rc; 444 444 445 445 log_msg(LOG_DEFAULT, LVL_DEBUG, "dhcpsrv_link_add(%zu)", link_id); … … 498 498 } 499 499 500 int dhcpsrv_link_remove(service_id_t link_id)500 errno_t dhcpsrv_link_remove(service_id_t link_id) 501 501 { 502 502 return ENOTSUP; 503 503 } 504 504 505 int dhcpsrv_discover(service_id_t link_id)505 errno_t dhcpsrv_discover(service_id_t link_id) 506 506 { 507 507 log_msg(LOG_DEFAULT, LVL_DEBUG, "dhcpsrv_link_add(%zu)", link_id); … … 520 520 static void dhcpsrv_recv_offer(dhcp_link_t *dlink, dhcp_offer_t *offer) 521 521 { 522 int rc;522 errno_t rc; 523 523 524 524 if (dlink->state != ds_selecting) { … … 546 546 static void dhcpsrv_recv_ack(dhcp_link_t *dlink, dhcp_offer_t *offer) 547 547 { 548 int rc;548 errno_t rc; 549 549 550 550 if (dlink->state != ds_requesting) { … … 572 572 dhcp_link_t *dlink = (dhcp_link_t *)arg; 573 573 dhcp_offer_t offer; 574 int rc;574 errno_t rc; 575 575 576 576 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: dhcpsrv_recv() %zu bytes", … … 600 600 { 601 601 dhcp_link_t *dlink = (dhcp_link_t *)arg; 602 int rc;602 errno_t rc; 603 603 604 604 assert(dlink->state == ds_selecting); … … 628 628 { 629 629 dhcp_link_t *dlink = (dhcp_link_t *)arg; 630 int rc;630 errno_t rc; 631 631 632 632 assert(dlink->state == ds_requesting);
Note:
See TracChangeset
for help on using the changeset viewer.