Changeset 614d065 in mainline
- Timestamp:
- 2010-10-16T14:32:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f9c7fd
- Parents:
- b69ceea
- Location:
- uspace
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/net_remote.c
rb69ceea r614d065 47 47 #include <adt/measured_strings.h> 48 48 49 int net_connect_module(services_t service) 49 /** Connects to the networking module. 50 * 51 * @returns The networking module phone on success. 52 */ 53 int net_connect_module(void) 50 54 { 51 55 return connect_to_service(SERVICE_NETWORKING); 52 56 } 53 57 58 /** Frees the received settings. 59 * 60 * @param[in] settings The received settings. 61 * @param[in] data The received settings data. 62 * @see net_get_device_conf_req() 63 * @see net_get_conf_req() 64 */ 54 65 void net_free_settings(measured_string_ref settings, char *data) 55 66 { 56 67 if (settings) 57 68 free(settings); 58 59 69 if (data) 60 70 free(data); 61 71 } 62 72 73 /** Returns the global configuration. 74 * 75 * The configuration names are read and the appropriate settings are set 76 * instead. Call net_free_settings() function to release the returned 77 * configuration. 78 * 79 * @param[in] net_phone The networking module phone. 80 * @param[in,out] configuration The requested configuration. The names are read 81 * and the appropriate settings are set instead. 82 * 83 * @param[in] count The configuration entries count. 84 * @param[in,out] data The configuration and settings data. 85 * @returns EOK on success. 86 * @returns EINVAL if the configuration is NULL. 87 * @returns EINVAL if the count is zero. 88 * @returns Other error codes as defined for the 89 * generic_translate_req() function. 90 */ 63 91 int 64 92 net_get_conf_req(int net_phone, measured_string_ref *configuration, … … 69 97 } 70 98 99 /** Returns the device specific configuration. 100 * 101 * Returns the global configuration if the device specific is not found. 102 * The configuration names are read and the appropriate settings are set 103 * instead. Call net_free_settings() function to release the returned 104 * configuration. 105 * 106 * @param[in] net_phone The networking module phone. 107 * @param[in] device_id The device identifier. 108 * @param[in,out] configuration The requested device configuration. The names 109 * are read and the appropriate settings are set instead. 110 * @param[in] count The configuration entries count. 111 * @param[in,out] data The configuration and settings data. 112 * @returns EOK on success. 113 * @returns EINVAL if the configuration is NULL. 114 * @returns EINVAL if the count is zero. 115 * @returns Other error codes as defined for the 116 * generic_translate_req() function. 117 */ 71 118 int 72 119 net_get_device_conf_req(int net_phone, device_id_t device_id, -
uspace/lib/net/include/net_interface.h
rb69ceea r614d065 27 27 */ 28 28 29 /** @addtogroup net29 /** @addtogroup libnet 30 30 * @{ 31 31 */ 32 32 33 #ifndef __NET_NET_INTERFACE_H__34 #define __NET_NET_INTERFACE_H__33 #ifndef LIBNET_NET_INTERFACE_H_ 34 #define LIBNET_NET_INTERFACE_H_ 35 35 36 36 #include <ipc/services.h> … … 40 40 41 41 /** @name Networking module interface 42 * 42 * This interface is used by other modules. 43 43 */ 44 44 /*@{*/ 45 45 46 /** Returns the device specific configuration. 47 * Returns the global configuration if the device specific is not found. 48 * The configuration names are read and the appropriate settings are set instead. 49 * Call net_free_settings() function to release the returned configuration. 50 * @param[in] net_phone The networking module phone. 51 * @param[in] device_id The device identifier. 52 * @param[in,out] configuration The requested device configuration. The names are read and the appropriate settings are set instead. 53 * @param[in] count The configuration entries count. 54 * @param[in,out] data The configuration and settings data. 55 * @returns EOK on success. 56 * @returns EINVAL if the configuration is NULL. 57 * @returns EINVAL if the count is zero (0). 58 * @returns Other error codes as defined for the generic_translate_req() function. 59 */ 60 extern int net_get_device_conf_req(int net_phone, device_id_t device_id, measured_string_ref * configuration, size_t count, char ** data); 61 62 /** Returns the global configuration. 63 * The configuration names are read and the appropriate settings are set instead. 64 * Call net_free_settings() function to release the returned configuration. 65 * @param[in] net_phone The networking module phone. 66 * @param[in,out] configuration The requested configuration. The names are read and the appropriate settings are set instead. 67 * @param[in] count The configuration entries count. 68 * @param[in,out] data The configuration and settings data. 69 * @returns EOK on success. 70 * @returns EINVAL if the configuration is NULL. 71 * @returns EINVAL if the count is zero (0). 72 * @returns Other error codes as defined for the generic_translate_req() function. 73 */ 74 extern int net_get_conf_req(int net_phone, measured_string_ref * configuration, size_t count, char ** data); 75 76 /** Frees the received settings. 77 * @param[in] settings The received settings. 78 * @param[in] data The received settings data. 79 * @see net_get_device_conf_req() 80 * @see net_get_conf_req() 81 */ 82 extern void net_free_settings(measured_string_ref settings, char * data); 83 84 /** Connects to the networking module. 85 * @param service The networking module service. Ignored parameter. 86 * @returns The networking module phone on success. 87 */ 88 extern int net_connect_module(services_t service); 46 extern int net_get_device_conf_req(int, device_id_t, measured_string_ref *, 47 size_t, char **); 48 extern int net_get_conf_req(int, measured_string_ref *, size_t, char **); 49 extern void net_free_settings(measured_string_ref, char *); 50 extern int net_connect_module(void); 89 51 90 52 /*@}*/ -
uspace/srv/net/il/arp/arp_module.c
rb69ceea r614d065 80 80 81 81 async_set_client_connection(client_connection); 82 arp_globals.net_phone = net_connect_module( SERVICE_NETWORKING);82 arp_globals.net_phone = net_connect_module(); 83 83 ERROR_PROPAGATE(pm_init()); 84 84 -
uspace/srv/net/il/ip/ip_module.c
rb69ceea r614d065 79 79 80 80 async_set_client_connection(client_connection); 81 ip_globals.net_phone = net_connect_module( SERVICE_NETWORKING);81 ip_globals.net_phone = net_connect_module(); 82 82 ERROR_PROPAGATE(pm_init()); 83 83 -
uspace/srv/net/nil/eth/eth_module.c
rb69ceea r614d065 63 63 64 64 async_set_client_connection(client_connection); 65 int net_phone = net_connect_module( SERVICE_NETWORKING);65 int net_phone = net_connect_module(); 66 66 ERROR_PROPAGATE(pm_init()); 67 67 -
uspace/srv/net/nil/nildummy/nildummy_module.c
rb69ceea r614d065 71 71 72 72 async_set_client_connection(client_connection); 73 int net_phone = net_connect_module( SERVICE_NETWORKING);73 int net_phone = net_connect_module(); 74 74 ERROR_PROPAGATE(pm_init()); 75 75 -
uspace/srv/net/tl/icmp/icmp_module.c
rb69ceea r614d065 69 69 70 70 async_set_client_connection(client_connection); 71 icmp_globals.net_phone = net_connect_module( SERVICE_NETWORKING);71 icmp_globals.net_phone = net_connect_module(); 72 72 if(icmp_globals.net_phone < 0){ 73 73 return icmp_globals.net_phone; -
uspace/srv/net/tl/tcp/tcp_module.c
rb69ceea r614d065 71 71 72 72 async_set_client_connection(client_connection); 73 tcp_globals.net_phone = net_connect_module( SERVICE_NETWORKING);73 tcp_globals.net_phone = net_connect_module(); 74 74 ERROR_PROPAGATE(pm_init()); 75 75 -
uspace/srv/net/tl/udp/udp_module.c
rb69ceea r614d065 69 69 70 70 async_set_client_connection(client_connection); 71 udp_globals.net_phone = net_connect_module( SERVICE_NETWORKING);71 udp_globals.net_phone = net_connect_module(); 72 72 if(udp_globals.net_phone < 0){ 73 73 return udp_globals.net_phone;
Note:
See TracChangeset
for help on using the changeset viewer.