Changeset 1038a9c in mainline
- Timestamp:
- 2012-06-01T19:12:06Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b16e77d
- Parents:
- a47f522
- Location:
- uspace/srv/net
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/ethip.c
ra47f522 r1038a9c 73 73 static int ethip_init(void) 74 74 { 75 int rc;76 77 75 async_set_client_connection(ethip_client_conn); 78 79 rc = loc_server_register(NAME);76 77 int rc = loc_server_register(NAME); 80 78 if (rc != EOK) { 81 79 log_msg(LVL_ERROR, "Failed registering server."); 82 80 return rc; 83 81 } 84 82 85 83 rc = ethip_nic_discovery_start(); 86 84 if (rc != EOK) 87 85 return rc; 88 86 89 87 return EOK; 90 88 } -
uspace/srv/net/ethip/ethip_nic.c
ra47f522 r1038a9c 150 150 static int ethip_nic_open(service_id_t sid) 151 151 { 152 ethip_nic_t *nic;153 int rc;154 152 bool in_list = false; 155 153 nic_address_t nic_address; 156 154 157 155 log_msg(LVL_DEBUG, "ethip_nic_open()"); 158 nic = ethip_nic_new();156 ethip_nic_t *nic = ethip_nic_new(); 159 157 if (nic == NULL) 160 158 return ENOMEM; 161 162 rc = loc_service_get_name(sid, &nic->svc_name);159 160 int rc = loc_service_get_name(sid, &nic->svc_name); 163 161 if (rc != EOK) { 164 162 log_msg(LVL_ERROR, "Failed getting service name."); 165 163 goto error; 166 164 } 167 165 168 166 nic->sess = loc_service_connect(EXCHANGE_SERIALIZE, sid, 0); 169 167 if (nic->sess == NULL) { … … 171 169 goto error; 172 170 } 173 171 174 172 nic->svc_id = sid; 175 173 176 174 rc = nic_callback_create(nic->sess, ethip_nic_cb_conn, nic); 177 175 if (rc != EOK) { … … 298 296 int ethip_nic_discovery_start(void) 299 297 { 300 int rc; 301 302 rc = loc_register_cat_change_cb(ethip_nic_cat_change_cb); 298 int rc = loc_register_cat_change_cb(ethip_nic_cat_change_cb); 303 299 if (rc != EOK) { 304 300 log_msg(LVL_ERROR, "Failed registering callback for NIC " … … 306 302 return rc; 307 303 } 308 304 309 305 return ethip_nic_check_new(); 310 306 } -
uspace/srv/net/inetsrv/inetsrv.c
ra47f522 r1038a9c 66 66 static int inet_init(void) 67 67 { 68 service_id_t sid;69 int rc;70 71 68 log_msg(LVL_DEBUG, "inet_init()"); 72 69 73 70 async_set_client_connection(inet_client_conn); 74 75 rc = loc_server_register(NAME);71 72 int rc = loc_server_register(NAME); 76 73 if (rc != EOK) { 77 74 log_msg(LVL_ERROR, "Failed registering server (%d).", rc); 78 75 return EEXIST; 79 76 } 80 77 78 service_id_t sid; 81 79 rc = loc_service_register_with_iface(SERVICE_NAME_INET, &sid, 82 80 INET_PORT_DEFAULT); … … 85 83 return EEXIST; 86 84 } 87 85 88 86 rc = loc_service_register_with_iface(SERVICE_NAME_INETCFG, &sid, 89 87 INET_PORT_CFG); … … 92 90 return EEXIST; 93 91 } 94 92 95 93 rc = loc_service_register_with_iface(SERVICE_NAME_INETPING, &sid, 96 94 INET_PORT_PING); … … 99 97 return EEXIST; 100 98 } 101 99 102 100 rc = inet_link_discovery_start(); 103 101 if (rc != EOK) 104 102 return EEXIST; 105 103 106 104 return EOK; 107 105 } -
uspace/srv/net/loopip/loopip.c
ra47f522 r1038a9c 91 91 category_id_t iplink_cat; 92 92 const char *svc_name = "net/loopback"; 93 93 94 94 async_set_client_connection(loopip_client_conn); 95 95 96 96 rc = loc_server_register(NAME); 97 97 if (rc != EOK) { -
uspace/srv/net/tcp/sock.c
ra47f522 r1038a9c 68 68 int tcp_sock_init(void) 69 69 { 70 int rc;71 72 70 socket_ports_initialize(&gsock); 73 71 74 72 async_set_client_connection(tcp_sock_connection); 75 76 rc = service_register(SERVICE_TCP);73 74 int rc = service_register(SERVICE_TCP); 77 75 if (rc != EOK) 78 76 return EEXIST; 79 77 80 78 return EOK; 81 79 } -
uspace/srv/net/udp/sock.c
ra47f522 r1038a9c 66 66 int udp_sock_init(void) 67 67 { 68 int rc;69 70 68 socket_ports_initialize(&gsock); 71 69 72 70 async_set_client_connection(udp_sock_connection); 73 74 rc = service_register(SERVICE_UDP);71 72 int rc = service_register(SERVICE_UDP); 75 73 if (rc != EOK) 76 74 return EEXIST; 77 75 78 76 return EOK; 79 77 }
Note:
See TracChangeset
for help on using the changeset viewer.