Changeset 8b5690f in mainline for uspace/lib/c/include/ipc/ip.h


Ignore:
Timestamp:
2011-02-03T05:11:01Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba38f72c
Parents:
22027b6e (diff), 86d7bfa (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 mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/ip.h

    r22027b6e r8b5690f  
    3939#define LIBC_IP_MESSAGES_H_
    4040
    41 #include <ipc/ipc.h>
    4241#include <ipc/net.h>
    43 
    4442#include <net/in.h>
    4543#include <net/ip_codes.h>
     
    4745/** IP module messages. */
    4846typedef enum {
     47        /** New device message.
     48         * @see ip_device_req()
     49         */
     50        NET_IP_DEVICE = NET_IP_FIRST,
     51       
    4952        /** Adds the routing entry.
    5053         * @see ip_add_route()
    5154         */
    52         NET_IP_ADD_ROUTE = NET_IP_FIRST,
     55        NET_IP_ADD_ROUTE,
     56       
    5357        /** Gets the actual route information.
    5458         * @see ip_get_route()
    5559         */
    5660        NET_IP_GET_ROUTE,
     61       
    5762        /** Processes the received error notification.
    5863         * @see ip_received_error_msg()
    5964         */
    6065        NET_IP_RECEIVED_ERROR,
     66       
    6167        /** Sets the default gateway.
    6268         * @see ip_set_default_gateway()
    6369         */
    64         NET_IP_SET_GATEWAY
     70        NET_IP_SET_GATEWAY,
     71       
     72        /** Packet size message.
     73         * @see ip_packet_size_req()
     74         */
     75        NET_IP_PACKET_SPACE,
     76       
     77        /** Packet send message.
     78         * @see ip_send_msg()
     79         */
     80        NET_IP_SEND
    6581} ip_messages;
    6682
     
    6884/*@{*/
    6985
    70 /** Returns the address message parameter.
    71  * @param[in] call The message call structure.
     86/** Return the address message parameter.
     87 *
     88 * @param[in] call Message call structure.
     89 *
    7290 */
    7391#define IP_GET_ADDRESS(call) \
    7492        ({ \
    7593                in_addr_t addr; \
    76                 addr.s_addr = IPC_GET_ARG3(*call); \
     94                addr.s_addr = IPC_GET_ARG3(call); \
    7795                addr; \
    7896        })
    7997
    80 /** Returns the gateway message parameter.
    81  * @param[in] call The message call structure.
     98/** Return the gateway message parameter.
     99 *
     100 * @param[in] call Message call structure.
     101 *
    82102 */
    83103#define IP_GET_GATEWAY(call) \
    84104        ({ \
    85105                in_addr_t addr; \
    86                 addr.s_addr = IPC_GET_ARG2(*call); \
     106                addr.s_addr = IPC_GET_ARG2(call); \
    87107                addr; \
    88108        })
    89109
    90 /** Sets the header length in the message answer.
    91  * @param[out] answer The message answer structure.
     110/** Set the header length in the message answer.
     111 *
     112 * @param[out] answer Message answer structure.
     113 *
    92114 */
    93 #define IP_SET_HEADERLEN(answer, value) \
    94         do { \
    95                 sysarg_t argument = (sysarg_t) (value); \
    96                 IPC_SET_ARG2(*answer, argument); \
    97         } while (0)
     115#define IP_SET_HEADERLEN(answer, value)  IPC_SET_ARG2(answer, (sysarg_t) (value))
    98116
    99 /** Returns the network mask message parameter.
    100  * @param[in] call The message call structure.
     117/** Return the network mask message parameter.
     118 *
     119 * @param[in] call Message call structure.
     120 *
    101121 */
    102122#define IP_GET_NETMASK(call) \
    103123        ({ \
    104124                in_addr_t addr; \
    105                 addr.s_addr = IPC_GET_ARG4(*call); \
     125                addr.s_addr = IPC_GET_ARG4(call); \
    106126                addr; \
    107127        })
    108128
    109 /** Returns the protocol message parameter.
    110  * @param[in] call The message call structure.
     129/** Return the protocol message parameter.
     130 *
     131 * @param[in] call Message call structure.
     132 *
    111133 */
    112 #define IP_GET_PROTOCOL(call) \
    113         ({ \
    114                 ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \
    115                 protocol; \
    116         })
     134#define IP_GET_PROTOCOL(call)  ((ip_protocol_t) IPC_GET_ARG1(call))
    117135
    118136/*@}*/
Note: See TracChangeset for help on using the changeset viewer.