Changeset 1916d1f in mainline for uspace/lib/net/generic/net_remote.c


Ignore:
Timestamp:
2011-07-12T13:41:26Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50fc490
Parents:
11809eab (diff), 6817eba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/generic/net_remote.c

    r11809eab r1916d1f  
    4747#include <adt/measured_strings.h>
    4848
    49 /** Connects to the networking module.
     49/** Connect to the networking module.
    5050 *
    51  * @return              The networking module phone on success.
     51 * @return Networking module session on success.
     52 *
    5253 */
    53 int net_connect_module(void)
     54async_sess_t *net_connect_module(void)
    5455{
    5556        return connect_to_service(SERVICE_NETWORKING);
    5657}
    5758
    58 /** Frees the received settings.
     59/** Free the received settings.
    5960 *
    60  * @param[in] settings  The received settings.
    61  * @param[in] data      The received settings data.
    62  * @see net_get_device_conf_req()
     61 * @param[in] settings Received settings.
     62 * @param[in] data     Received settings data.
     63 *
     64 * @see net_get_device_conf_req()
    6365 * @see net_get_conf_req()
     66 *
    6467 */
    6568void net_free_settings(measured_string_t *settings, uint8_t *data)
     
    7174}
    7275
    73 /** Returns the global configuration.
     76/** Return the global configuration.
    7477 *
    7578 * The configuration names are read and the appropriate settings are set
     
    7780 * configuration.
    7881 *
    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 * @param[in]     sess          Networking module session.
     83 * @param[in,out] configuration Requested configuration. The names are
     84 *                              read and the appropriate settings are set
     85 *                              instead.
    8286 *
    83  * @param[in] count     The configuration entries count.
    84  * @param[in,out] data  The configuration and settings data.
    85  * @return              EOK on success.
    86  * @return              EINVAL if the configuration is NULL.
    87  * @return              EINVAL if the count is zero.
    88  * @return              Other error codes as defined for the
    89  *                      generic_translate_req() function.
     87 * @param[in]     count         Configuration entries count.
     88 * @param[in,out] data          Configuration and settings data.
     89 *
     90 * @return EOK on success.
     91 * @return EINVAL if the configuration is NULL.
     92 * @return EINVAL if the count is zero.
     93 * @return Other error codes as defined for the
     94 *         generic_translate_req() function.
     95 *
    9096 */
    91 int
    92 net_get_conf_req(int net_phone, measured_string_t **configuration,
     97int net_get_conf_req(async_sess_t *sess, measured_string_t **configuration,
    9398    size_t count, uint8_t **data)
    9499{
    95         return generic_translate_req(net_phone, NET_NET_GET_DEVICE_CONF, 0, 0,
     100        return generic_translate_req(sess, NET_NET_GET_DEVICE_CONF, 0, 0,
    96101            *configuration, count, configuration, data);
    97102}
    98103
    99 /** Returns the device specific configuration.
     104/** Return the device specific configuration.
    100105 *
    101  * Returns the global configuration if the device specific is not found.
     106 * Return the global configuration if the device specific is not found.
    102107 * The configuration names are read and the appropriate settings are set
    103108 * instead. Call net_free_settings() function to release the returned
    104109 * configuration.
    105110 *
    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  * @return              EOK on success.
    113  * @return              EINVAL if the configuration is NULL.
    114  * @return              EINVAL if the count is zero.
    115  * @return              Other error codes as defined for the
    116  *                      generic_translate_req() function.
     111 * @param[in]     sess          The networking module session.
     112 * @param[in]     device_id     Device identifier.
     113 * @param[in,out] configuration Requested device configuration. The names
     114 *                              are read and the appropriate settings are
     115 *                              set instead.
     116 * @param[in]     count         Configuration entries count.
     117 * @param[in,out] data          Configuration and settings data.
     118 *
     119 * @return EOK on success.
     120 * @return EINVAL if the configuration is NULL.
     121 * @return EINVAL if the count is zero.
     122 * @return Other error codes as defined for the
     123 *         generic_translate_req() function.
     124 *
    117125 */
    118 int
    119 net_get_device_conf_req(int net_phone, device_id_t device_id,
     126int net_get_device_conf_req(async_sess_t *sess, device_id_t device_id,
    120127    measured_string_t **configuration, size_t count, uint8_t **data)
    121128{
    122         return generic_translate_req(net_phone, NET_NET_GET_DEVICE_CONF,
     129        return generic_translate_req(sess, NET_NET_GET_DEVICE_CONF,
    123130            device_id, 0, *configuration, count, configuration, data);
    124131}
Note: See TracChangeset for help on using the changeset viewer.