Changeset 0e25780 in mainline
- Timestamp:
- 2012-03-07T21:01:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45aa22c
- Parents:
- 3d016ac
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
r3d016ac r0e25780 156 156 $(USPACE_PATH)/app/edit/edit \ 157 157 $(USPACE_PATH)/app/ext2info/ext2info \ 158 $(USPACE_PATH)/app/inetcfg/inetcfg \ 158 159 $(USPACE_PATH)/app/kill/kill \ 159 160 $(USPACE_PATH)/app/killall/killall \ -
uspace/Makefile
r3d016ac r0e25780 42 42 app/getterm \ 43 43 app/init \ 44 app/inetcfg \ 44 45 app/kill \ 45 46 app/killall \ -
uspace/lib/c/Makefile
r3d016ac r0e25780 88 88 generic/futex.c \ 89 89 generic/inet.c \ 90 generic/inetcfg.c \ 90 91 generic/io/asprintf.c \ 91 92 generic/io/io.c \ -
uspace/lib/c/include/ipc/inet.h
r3d016ac r0e25780 38 38 #include <ipc/common.h> 39 39 40 /** Inet ports */ 41 typedef enum { 42 /** Default port */ 43 INET_PORT_DEFAULT = 1, 44 /** Configuration port */ 45 INET_PORT_CFG 46 } inet_port_t; 47 48 /** Requests on Inet default port */ 40 49 typedef enum { 41 50 INET_CALLBACK_CREATE = IPC_FIRST_USER_METHOD, … … 45 54 } inet_request_t; 46 55 56 /** Events on Inet default port */ 47 57 typedef enum { 48 58 INET_EV_RECV = IPC_FIRST_USER_METHOD 49 59 } inet_event_t; 60 61 /** Requests on Inet configuration port */ 62 typedef enum { 63 INETCFG_ADDR_CREATE_STATIC = IPC_FIRST_USER_METHOD, 64 INETCFG_ADDR_DELETE, 65 INETCFG_ADDR_GET, 66 INETCFG_GET_ADDR_LIST, 67 INETCFG_GET_LINK_LIST, 68 INETCFG_LINK_GET, 69 } inetcfg_request_t; 50 70 51 71 #endif -
uspace/lib/c/include/ipc/services.h
r3d016ac r0e25780 52 52 } services_t; 53 53 54 #define SERVICE_NAME_INET "net/inet" 54 #define SERVICE_NAME_INET "net/inet" 55 #define SERVICE_NAME_INETCFG "net/inetcfg" 55 56 56 57 #endif -
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.