Changes in uspace/lib/net/generic/net_remote.c [614d065:514ee46] in mainline
- File:
-
- 1 edited
-
uspace/lib/net/generic/net_remote.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/net_remote.c
r614d065 r514ee46 27 27 */ 28 28 29 /** @addtogroup libnet30 * @{29 /** @addtogroup net 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * Networking interface implementation for remote modules.35 * @see net_interface.h34 * Networking interface implementation for remote modules. 35 * @see net_interface.h 36 36 */ 37 37 38 38 #include <ipc/services.h> 39 #include <ipc/net_net.h>40 39 41 40 #include <malloc.h> … … 46 45 #include <net_interface.h> 47 46 #include <adt/measured_strings.h> 47 #include <net_net_messages.h> 48 48 49 /** Connects to the networking module. 50 * 51 * @returns The networking module phone on success. 52 */ 53 int net_connect_module(void) 49 int net_connect_module(services_t service) 54 50 { 55 51 return connect_to_service(SERVICE_NETWORKING); 56 52 } 57 53 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 */ 65 void net_free_settings(measured_string_ref settings, char *data) 54 void net_free_settings(measured_string_ref settings, char * data) 66 55 { 67 56 if (settings) 68 57 free(settings); 58 69 59 if (data) 70 60 free(data); 71 61 } 72 62 73 /** Returns the global configuration.74 *75 * The configuration names are read and the appropriate settings are set76 * instead. Call net_free_settings() function to release the returned77 * configuration.78 *79 * @param[in] net_phone The networking module phone.80 * @param[in,out] configuration The requested configuration. The names are read81 * 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 the89 * generic_translate_req() function.90 */91 63 int 92 net_get_conf_req(int net_phone, measured_string_ref * configuration,93 size_t count, char ** data)64 net_get_conf_req(int net_phone, measured_string_ref * configuration, 65 size_t count, char ** data) 94 66 { 95 67 return generic_translate_req(net_phone, NET_NET_GET_DEVICE_CONF, 0, 0, … … 97 69 } 98 70 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 set103 * instead. Call net_free_settings() function to release the returned104 * 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 names109 * 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 the116 * generic_translate_req() function.117 */118 71 int 119 72 net_get_device_conf_req(int net_phone, device_id_t device_id, 120 measured_string_ref * configuration, size_t count, char **data)73 measured_string_ref * configuration, size_t count, char ** data) 121 74 { 122 75 return generic_translate_req(net_phone, NET_NET_GET_DEVICE_CONF,
Note:
See TracChangeset
for help on using the changeset viewer.
