Changeset 0e25780 in mainline for uspace/srv
- Timestamp:
- 2012-03-07T21:01:10Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45aa22c
- Parents:
- 3d016ac
- Location:
- uspace/srv/inet
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/inet/Makefile
r3d016ac r0e25780 34 34 inet.c \ 35 35 inet_link.c \ 36 inetcfg.c \ 36 37 pdu.c 37 38 -
uspace/srv/inet/inet.c
r3d016ac r0e25780 49 49 #include "addrobj.h" 50 50 #include "inet.h" 51 #include "inetcfg.h" 51 52 #include "inet_link.h" 52 53 … … 73 74 } 74 75 75 rc = loc_service_register(SERVICE_NAME_INET, &sid); 76 rc = loc_service_register_with_iface(SERVICE_NAME_INET, &sid, 77 INET_PORT_DEFAULT); 78 if (rc != EOK) { 79 log_msg(LVL_ERROR, "Failed registering service (%d).", rc); 80 return EEXIST; 81 } 82 83 rc = loc_service_register_with_iface(SERVICE_NAME_INETCFG, &sid, 84 INET_PORT_CFG); 76 85 if (rc != EOK) { 77 86 log_msg(LVL_ERROR, "Failed registering service (%d).", rc); … … 220 229 } 221 230 222 static void inet_ client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)231 static void inet_default_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg) 223 232 { 224 233 inet_client_t client; 225 234 226 log_msg(LVL_DEBUG, "inet_ client_conn()");235 log_msg(LVL_DEBUG, "inet_default_conn()"); 227 236 228 237 /* Accept the connection */ … … 263 272 } 264 273 274 static void inet_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg) 275 { 276 sysarg_t port; 277 278 log_msg(LVL_DEBUG, "inet_client_conn(%d, %d, %d)", 279 (int)IPC_GET_ARG1(*icall), (int)IPC_GET_ARG2(*icall), 280 (int)IPC_GET_ARG3(*icall)); 281 282 port = IPC_GET_ARG1(*icall); 283 284 switch (port) { 285 case INET_PORT_DEFAULT: 286 inet_default_conn(iid, icall, arg); 287 break; 288 case INET_PORT_CFG: 289 inet_cfg_conn(iid, icall, arg); 290 break; 291 default: 292 printf("uknown port number %d\n", port); 293 async_answer_0(iid, ENOTSUP); 294 break; 295 } 296 } 297 265 298 static inet_client_t *inet_client_find(uint8_t proto) 266 299 { -
uspace/srv/inet/inet.h
r3d016ac r0e25780 64 64 } inet_naddr_t; 65 65 66 /** Address object info */ 67 typedef struct { 68 /** Network address */ 69 inet_naddr_t naddr; 70 } inet_addr_info_t; 71 72 /** IP link info */ 73 typedef struct { 74 int dummy; 75 } inet_link_info_t; 76 66 77 typedef struct { 67 78 inet_addr_t src;
Note:
See TracChangeset
for help on using the changeset viewer.
