Rev 3666 | Rev 3886 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3666 | Rev 3685 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | int netif_start_module( void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall )); |
62 | int netif_start_module( void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall )); |
63 | 63 | ||
64 | int netif_device_find( netif_device_id_t device_id, netif_device_ref * device ){ |
64 | int netif_device_find( netif_device_id_t device_id, netif_device_ref * device ){ |
65 | * device = netif_device_map_find( & netif_globals.netif_device_map, device_id ); |
65 | * device = netif_device_map_find( & netif_globals.netif_device_map, device_id ); |
66 | if( ! * device ) return ENOENT; |
66 | if( ! * device ) return ENOENT; |
67 | if(( ** device ).status == NETIF_NULL ) return EPERM; |
67 | if(( ** device ).state == NETIF_NULL ) return EPERM; |
68 | return EOK; |
68 | return EOK; |
69 | } |
69 | } |
70 | 70 | ||
71 | void netif_device_stats_null( netif_device_stats_ref stats ) |
71 | void netif_device_stats_null( netif_device_stats_ref stats ) |
72 | { |
72 | { |
Line 111... | Line 111... | ||
111 | case NET_NETIF_PROBE: |
111 | case NET_NETIF_PROBE: |
112 | return netif_probe_message( arg1, arg2, arg3, result1, result2, result3 ); |
112 | return netif_probe_message( arg1, arg2, arg3, result1, result2, result3 ); |
113 | case NET_NETIF_REGISTER: |
113 | case NET_NETIF_REGISTER: |
114 | case NET_LL_REGISTER: |
114 | case NET_LL_REGISTER: |
115 | ERROR_PROPAGATE( netif_device_find( arg1, & device )); |
115 | ERROR_PROPAGATE( netif_device_find( arg1, & device )); |
116 | // TODO back phone |
- | |
117 | device->ll_registered = callid; |
116 | device->ll_registered = connect_to_service( arg2 ); |
118 | return EOK; |
117 | return EOK; |
119 | case NET_NETIF_SEND: |
118 | case NET_NETIF_SEND: |
120 | return netif_send_message( arg1, arg2, arg3, result1, result2, result3 ); |
119 | return netif_send_message( arg1, arg2, arg3, result1, result2, result3 ); |
121 | case NET_NETIF_START: |
120 | case NET_NETIF_START: |
122 | return netif_start_message( arg1, arg2, arg3, result1, result2, result3 ); |
121 | return netif_start_message( arg1, arg2, arg3, result1, result2, result3 ); |
Line 136... | Line 135... | ||
136 | } |
135 | } |
137 | return ENOTSUP; |
136 | return ENOTSUP; |
138 | } |
137 | } |
139 | 138 | ||
140 | int netif_start_module( void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall )){ |
139 | int netif_start_module( void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall )){ |
141 | /* services_t need[ 2 ]; |
140 | services_t need[ 2 ]; |
142 | int * need_phone[ 2 ]; |
141 | int * need_phone[ 2 ]; |
143 | 142 | ||
144 | need[ 0 ] = SERVICE_NETWORKING; |
143 | need[ 0 ] = SERVICE_NETWORKING; |
145 | need[ 1 ] = NULL; |
144 | need[ 1 ] = NULL; |
146 | need_phone[ 0 ] = & netif_globals.networking_phone; |
145 | need_phone[ 0 ] = & netif_globals.networking_phone; |
147 | need_phone[ 1 ] = NULL; |
146 | need_phone[ 1 ] = NULL; |
148 | */ netif_device_map_initialize( & netif_globals.netif_device_map ); |
147 | netif_device_map_initialize( & netif_globals.netif_device_map ); |
149 | return start_service( NULL, /*need, need_phone*/ NULL, NULL, client_connection, netif_initialize ); |
148 | return start_service( NULL, need, need_phone, client_connection, netif_initialize ); |
150 | } |
149 | } |
151 | 150 | ||
152 | /** @} |
151 | /** @} |
153 | */ |
152 | */ |