Changeset 80cd7cd in mainline for uspace/lib/c/include/ipc/ip.h


Ignore:
Timestamp:
2011-01-13T20:58:24Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
87e373b
Parents:
eaef141 (diff), a613fea1 (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

    reaef141 r80cd7cd  
    4747/** IP module messages. */
    4848typedef enum {
     49        /** New device message.
     50         * @see ip_device_req()
     51         */
     52        NET_IP_DEVICE = NET_IP_FIRST,
     53       
    4954        /** Adds the routing entry.
    5055         * @see ip_add_route()
    5156         */
    52         NET_IP_ADD_ROUTE = NET_IP_FIRST,
     57        NET_IP_ADD_ROUTE,
     58       
    5359        /** Gets the actual route information.
    5460         * @see ip_get_route()
    5561         */
    5662        NET_IP_GET_ROUTE,
     63       
    5764        /** Processes the received error notification.
    5865         * @see ip_received_error_msg()
    5966         */
    6067        NET_IP_RECEIVED_ERROR,
     68       
    6169        /** Sets the default gateway.
    6270         * @see ip_set_default_gateway()
    6371         */
    64         NET_IP_SET_GATEWAY
     72        NET_IP_SET_GATEWAY,
     73       
     74        /** Packet size message.
     75         * @see ip_packet_size_req()
     76         */
     77        NET_IP_PACKET_SPACE,
     78       
     79        /** Packet send message.
     80         * @see ip_send_msg()
     81         */
     82        NET_IP_SEND
    6583} ip_messages;
    6684
     
    6886/*@{*/
    6987
    70 /** Returns the address message parameter.
    71  * @param[in] call The message call structure.
     88/** Return the address message parameter.
     89 *
     90 * @param[in] call Message call structure.
     91 *
    7292 */
    7393#define IP_GET_ADDRESS(call) \
    7494        ({ \
    7595                in_addr_t addr; \
    76                 addr.s_addr = IPC_GET_ARG3(*call); \
     96                addr.s_addr = IPC_GET_ARG3(call); \
    7797                addr; \
    7898        })
    7999
    80 /** Returns the gateway message parameter.
    81  * @param[in] call The message call structure.
     100/** Return the gateway message parameter.
     101 *
     102 * @param[in] call Message call structure.
     103 *
    82104 */
    83105#define IP_GET_GATEWAY(call) \
    84106        ({ \
    85107                in_addr_t addr; \
    86                 addr.s_addr = IPC_GET_ARG2(*call); \
     108                addr.s_addr = IPC_GET_ARG2(call); \
    87109                addr; \
    88110        })
    89111
    90 /** Sets the header length in the message answer.
    91  * @param[out] answer The message answer structure.
     112/** Set the header length in the message answer.
     113 *
     114 * @param[out] answer Message answer structure.
     115 *
    92116 */
    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)
     117#define IP_SET_HEADERLEN(answer, value)  IPC_SET_ARG2(answer, (sysarg_t) (value))
    98118
    99 /** Returns the network mask message parameter.
    100  * @param[in] call The message call structure.
     119/** Return the network mask message parameter.
     120 *
     121 * @param[in] call Message call structure.
     122 *
    101123 */
    102124#define IP_GET_NETMASK(call) \
    103125        ({ \
    104126                in_addr_t addr; \
    105                 addr.s_addr = IPC_GET_ARG4(*call); \
     127                addr.s_addr = IPC_GET_ARG4(call); \
    106128                addr; \
    107129        })
    108130
    109 /** Returns the protocol message parameter.
    110  * @param[in] call The message call structure.
     131/** Return the protocol message parameter.
     132 *
     133 * @param[in] call Message call structure.
     134 *
    111135 */
    112 #define IP_GET_PROTOCOL(call) \
    113         ({ \
    114                 ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \
    115                 protocol; \
    116         })
     136#define IP_GET_PROTOCOL(call)  ((ip_protocol_t) IPC_GET_ARG1(call))
    117137
    118138/*@}*/
Note: See TracChangeset for help on using the changeset viewer.