Changes in uspace/srv/net/inetsrv/inetcfg.c [8d2dd7f2:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/inetcfg.c
r8d2dd7f2 rb7fd2a0 52 52 #include "sroute.h" 53 53 54 static int inetcfg_addr_create_static(char *name, inet_naddr_t *naddr,54 static errno_t inetcfg_addr_create_static(char *name, inet_naddr_t *naddr, 55 55 sysarg_t link_id, sysarg_t *addr_id) 56 56 { … … 58 58 inet_addrobj_t *addr; 59 59 inet_addr_t iaddr; 60 int rc;60 errno_t rc; 61 61 62 62 ilink = inet_link_get_by_id(link_id); … … 95 95 } 96 96 97 static int inetcfg_addr_delete(sysarg_t addr_id)97 static errno_t inetcfg_addr_delete(sysarg_t addr_id) 98 98 { 99 99 inet_addrobj_t *addr; … … 109 109 } 110 110 111 static int inetcfg_addr_get(sysarg_t addr_id, inet_addr_info_t *ainfo)111 static errno_t inetcfg_addr_get(sysarg_t addr_id, inet_addr_info_t *ainfo) 112 112 { 113 113 inet_addrobj_t *addr; … … 124 124 } 125 125 126 static int inetcfg_addr_get_id(char *name, sysarg_t link_id, sysarg_t *addr_id)126 static errno_t inetcfg_addr_get_id(char *name, sysarg_t link_id, sysarg_t *addr_id) 127 127 { 128 128 inet_link_t *ilink; … … 145 145 } 146 146 147 static int inetcfg_get_addr_list(sysarg_t **addrs, size_t *count)147 static errno_t inetcfg_get_addr_list(sysarg_t **addrs, size_t *count) 148 148 { 149 149 return inet_addrobj_get_id_list(addrs, count); 150 150 } 151 151 152 static int inetcfg_get_link_list(sysarg_t **addrs, size_t *count)152 static errno_t inetcfg_get_link_list(sysarg_t **addrs, size_t *count) 153 153 { 154 154 return inet_link_get_id_list(addrs, count); 155 155 } 156 156 157 static int inetcfg_get_sroute_list(sysarg_t **sroutes, size_t *count)157 static errno_t inetcfg_get_sroute_list(sysarg_t **sroutes, size_t *count) 158 158 { 159 159 return inet_sroute_get_id_list(sroutes, count); 160 160 } 161 161 162 static int inetcfg_link_add(sysarg_t link_id)162 static errno_t inetcfg_link_add(sysarg_t link_id) 163 163 { 164 164 return inet_link_open(link_id); 165 165 } 166 166 167 static int inetcfg_link_get(sysarg_t link_id, inet_link_info_t *linfo)167 static errno_t inetcfg_link_get(sysarg_t link_id, inet_link_info_t *linfo) 168 168 { 169 169 inet_link_t *ilink; … … 185 185 } 186 186 187 static int inetcfg_link_remove(sysarg_t link_id)187 static errno_t inetcfg_link_remove(sysarg_t link_id) 188 188 { 189 189 return ENOTSUP; 190 190 } 191 191 192 static int inetcfg_sroute_create(char *name, inet_naddr_t *dest,192 static errno_t inetcfg_sroute_create(char *name, inet_naddr_t *dest, 193 193 inet_addr_t *router, sysarg_t *sroute_id) 194 194 { … … 210 210 } 211 211 212 static int inetcfg_sroute_delete(sysarg_t sroute_id)212 static errno_t inetcfg_sroute_delete(sysarg_t sroute_id) 213 213 { 214 214 inet_sroute_t *sroute; … … 224 224 } 225 225 226 static int inetcfg_sroute_get(sysarg_t sroute_id, inet_sroute_info_t *srinfo)226 static errno_t inetcfg_sroute_get(sysarg_t sroute_id, inet_sroute_info_t *srinfo) 227 227 { 228 228 inet_sroute_t *sroute; … … 239 239 } 240 240 241 static int inetcfg_sroute_get_id(char *name, sysarg_t *sroute_id)241 static errno_t inetcfg_sroute_get_id(char *name, sysarg_t *sroute_id) 242 242 { 243 243 inet_sroute_t *sroute; … … 275 275 276 276 inet_naddr_t naddr; 277 int rc = async_data_write_finalize(callid, &naddr, size);277 errno_t rc = async_data_write_finalize(callid, &naddr, size); 278 278 if (rc != EOK) { 279 279 async_answer_0(callid, rc); … … 299 299 { 300 300 sysarg_t addr_id; 301 int rc;301 errno_t rc; 302 302 303 303 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_delete_srv()"); … … 321 321 ainfo.name = NULL; 322 322 323 int rc = inetcfg_addr_get(addr_id, &ainfo);323 errno_t rc = inetcfg_addr_get(addr_id, &ainfo); 324 324 if (rc != EOK) { 325 325 async_answer_0(iid, rc); … … 364 364 } 365 365 366 async_answer_1(iid, (sysarg_t)rc, ainfo.ilink);366 async_answer_1(iid, rc, ainfo.ilink); 367 367 } 368 368 … … 372 372 sysarg_t link_id; 373 373 sysarg_t addr_id; 374 int rc;374 errno_t rc; 375 375 376 376 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_get_id_srv()"); … … 399 399 size_t size; 400 400 sysarg_t *id_buf; 401 int rc;401 errno_t rc; 402 402 403 403 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_get_addr_list_srv()"); … … 419 419 size = min(act_size, max_size); 420 420 421 sysarg_t retval = async_data_read_finalize(rcallid, id_buf, size);421 errno_t retval = async_data_read_finalize(rcallid, id_buf, size); 422 422 free(id_buf); 423 423 … … 433 433 size_t size; 434 434 sysarg_t *id_buf; 435 int rc;435 errno_t rc; 436 436 437 437 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_get_addr_list_srv()"); … … 453 453 size = min(act_size, max_size); 454 454 455 sysarg_t retval = async_data_read_finalize(rcallid, id_buf, size);455 errno_t retval = async_data_read_finalize(rcallid, id_buf, size); 456 456 free(id_buf); 457 457 … … 467 467 size_t size; 468 468 sysarg_t *id_buf; 469 int rc;469 errno_t rc; 470 470 471 471 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_get_sroute_list_srv()"); … … 487 487 size = min(act_size, max_size); 488 488 489 sysarg_t retval = async_data_read_finalize(rcallid, id_buf, size);489 errno_t retval = async_data_read_finalize(rcallid, id_buf, size); 490 490 free(id_buf); 491 491 … … 496 496 { 497 497 sysarg_t link_id; 498 int rc;498 errno_t rc; 499 499 500 500 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_link_add_srv()"); … … 515 515 sysarg_t link_id; 516 516 inet_link_info_t linfo; 517 int rc;517 errno_t rc; 518 518 519 519 link_id = IPC_GET_ARG1(*call); … … 542 542 } 543 543 544 sysarg_t retval = async_data_read_finalize(name_callid, linfo.name,544 errno_t retval = async_data_read_finalize(name_callid, linfo.name, 545 545 min(name_max_size, str_size(linfo.name))); 546 546 if (retval != EOK) { … … 562 562 { 563 563 sysarg_t link_id; 564 int rc;564 errno_t rc; 565 565 566 566 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_link_remove_srv()"); … … 592 592 593 593 inet_naddr_t dest; 594 int rc = async_data_write_finalize(callid, &dest, size);594 errno_t rc = async_data_write_finalize(callid, &dest, size); 595 595 if (rc != EOK) { 596 596 async_answer_0(callid, rc); … … 636 636 { 637 637 sysarg_t sroute_id; 638 int rc;638 errno_t rc; 639 639 640 640 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_delete_srv()"); … … 658 658 srinfo.name = NULL; 659 659 660 int rc = inetcfg_sroute_get(sroute_id, &srinfo);660 errno_t rc = inetcfg_sroute_get(sroute_id, &srinfo); 661 661 if (rc != EOK) { 662 662 async_answer_0(iid, rc); … … 714 714 free(srinfo.name); 715 715 716 async_answer_0(iid, (sysarg_t)rc);716 async_answer_0(iid, rc); 717 717 } 718 718 … … 721 721 char *name; 722 722 sysarg_t sroute_id; 723 int rc;723 errno_t rc; 724 724 725 725 log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_get_id_srv()");
Note:
See TracChangeset
for help on using the changeset viewer.