Changeset bc38578 in mainline
- Timestamp:
- 2012-02-06T16:12:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ceba4bed
- Parents:
- 06295a9
- Location:
- uspace/srv/ethip
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ethip/ethip.c
r06295a9 rbc38578 106 106 } 107 107 108 nic->iplink_sid = sid; 109 108 110 rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING); 109 111 if (rc != EOK) { … … 128 130 static void ethip_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg) 129 131 { 130 log_msg(LVL_DEBUG, "ethip_client_conn(%u)", (unsigned) IPC_GET_ARG1(*icall)); 131 if (0) iplink_conn(iid, icall, NULL); 132 ethip_nic_t *nic; 133 service_id_t sid; 134 135 sid = (service_id_t)IPC_GET_ARG1(*icall); 136 log_msg(LVL_DEBUG, "ethip_client_conn(%u)", (unsigned)sid); 137 nic = ethip_nic_find_by_iplink_sid(sid); 138 if (nic == NULL) { 139 log_msg(LVL_WARN, "Uknown service ID."); 140 return; 141 } 142 143 iplink_conn(iid, icall, &nic->iplink); 132 144 } 133 145 -
uspace/srv/ethip/ethip.h
r06295a9 rbc38578 45 45 46 46 iplink_srv_t iplink; 47 service_id_t iplink_sid; 47 48 } ethip_nic_t; 48 49 -
uspace/srv/ethip/ethip_nic.c
r06295a9 rbc38578 35 35 */ 36 36 37 #include <adt/list.h> 37 38 #include <async.h> 38 39 #include <bool.h> … … 256 257 } 257 258 259 ethip_nic_t *ethip_nic_find_by_iplink_sid(service_id_t iplink_sid) 260 { 261 log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid(%u)", 262 (unsigned) iplink_sid); 263 264 list_foreach(ethip_nic_list, link) { 265 log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid - element"); 266 ethip_nic_t *nic = list_get_instance(link, ethip_nic_t, 267 nic_list); 268 269 if (nic->iplink_sid == iplink_sid) { 270 log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid - found %p", nic); 271 return nic; 272 } 273 } 274 275 log_msg(LVL_DEBUG, "ethip_nic_find_by_iplink_sid - not found"); 276 return NULL; 277 } 278 258 279 /** @} 259 280 */ -
uspace/srv/ethip/ethip_nic.h
r06295a9 rbc38578 38 38 #define ETHIP_NIC_H_ 39 39 40 #include <ipc/loc.h> 41 40 42 extern int ethip_nic_discovery_start(void); 43 extern ethip_nic_t *ethip_nic_find_by_iplink_sid(service_id_t); 41 44 42 45 #endif
Note:
See TracChangeset
for help on using the changeset viewer.