Changeset 357b5f5 in mainline for uspace/lib/c/include/ipc/icmp.h


Ignore:
Timestamp:
2011-01-23T20:09:13Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fdb9982c
Parents:
cead2aa (diff), 7e36c8d (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/icmp.h

    rcead2aa r357b5f5  
    3333/** @file
    3434 * ICMP module messages.
    35  * @see icmp_interface.h
     35 * @see icmp_remote.h
    3636 */
    3737
     
    4848/** ICMP module messages. */
    4949typedef enum {
    50         /** Sends echo request. @see icmp_echo() */
     50        /** Send echo request. @see icmp_echo() */
    5151        NET_ICMP_ECHO = NET_ICMP_FIRST,
    5252       
    5353        /**
    54          * Sends destination unreachable error message.
     54         * Send destination unreachable error message.
    5555         * @see icmp_destination_unreachable_msg()
    5656         */
     
    5858       
    5959        /**
    60          * Sends source quench error message.
     60         * Send source quench error message.
    6161         * @see icmp_source_quench_msg()
    6262         */
     
    6464       
    6565        /**
    66          * Sends time exceeded error message.
     66         * Send time exceeded error message.
    6767         * @see icmp_time_exceeded_msg()
    6868         */
     
    7070       
    7171        /**
    72          * Sends parameter problem error message.
     72         * Send parameter problem error message.
    7373         * @see icmp_parameter_problem_msg()
    7474         */
    75         NET_ICMP_PARAMETERPROB,
    76        
    77         /** Initializes new connection. */
    78         NET_ICMP_INIT
    79 } icmp_messages;
     75        NET_ICMP_PARAMETERPROB
     76} icmp_messages_t;
    8077
    8178/** @name ICMP specific message parameters definitions */
    8279/*@{*/
    8380
    84 /** Returns the ICMP code message parameter.
     81/** Return the ICMP code message parameter.
    8582 *
    86  * @param[in] call      The message call structure.
     83 * @param[in] call Message call structure.
     84 *
    8785 */
    88 #define ICMP_GET_CODE(call) \
    89         ({ \
    90                 icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); \
    91                 code; \
    92         })
     86#define ICMP_GET_CODE(call)  ((icmp_code_t) IPC_GET_ARG1(call))
    9387
    94 /** Returns the ICMP link MTU message parameter.
     88/** Return the ICMP link MTU message parameter.
    9589 *
    96  * @param[in] call      The message call structure.
     90 * @param[in] call Message call structure.
     91 *
    9792 */
    98 #define ICMP_GET_MTU(call) \
    99         ({ \
    100                 icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); \
    101                 mtu; \
    102         })
     93#define ICMP_GET_MTU(call)  ((icmp_param_t) IPC_GET_ARG3(call))
    10394
    104 /** Returns the pointer message parameter.
     95/** Return the pointer message parameter.
    10596 *
    106  * @param[in] call      The message call structure.
     97 * @param[in] call Message call structure.
     98 *
    10799 */
    108 #define ICMP_GET_POINTER(call) \
    109         ({ \
    110                 icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); \
    111                 pointer; \
    112         })
     100#define ICMP_GET_POINTER(call)  ((icmp_param_t) IPC_GET_ARG3(call))
    113101
    114 /** Returns the size message parameter.
     102/** Return the size message parameter.
    115103 *
    116  * @param[in] call      The message call structure.
     104 * @param[in] call Message call structure.
     105 *
    117106 */
    118 #define ICMP_GET_SIZE(call) \
    119         ({ \
    120                 size_t size = (size_t) IPC_GET_ARG1(call); \
    121                 size; \
    122         })
     107#define ICMP_GET_SIZE(call)  ((size_t) IPC_GET_ARG1(call))
    123108
    124 /** Returns the timeout message parameter.
     109/** Return the timeout message parameter.
    125110 *
    126  * @param[in] call      The message call structure.
     111 * @param[in] call Message call structure.
     112 *
    127113 */
    128 #define ICMP_GET_TIMEOUT(call) \
    129         ({ \
    130                 suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); \
    131                 timeout; \
    132         })
     114#define ICMP_GET_TIMEOUT(call)  ((suseconds_t) IPC_GET_ARG2(call))
    133115
    134 /** Returns the time to live message parameter.
     116/** Return the time to live message parameter.
    135117 *
    136  * @param[in] call      The message call structure.
     118 * @param[in] call Message call structure.
     119 *
    137120 */
    138 #define ICMP_GET_TTL(call) \
    139         ({ \
    140                 ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); \
    141                 ttl; \
    142         })
     121#define ICMP_GET_TTL(call)  ((ip_ttl_t) IPC_GET_ARG3(call))
    143122
    144 /** Returns the type of service message parameter.
     123/** Return the type of service message parameter.
    145124 *
    146  * @param[in] call      The message call structure.
     125 * @param[in] call Message call structure.
     126 *
    147127 */
    148 #define ICMP_GET_TOS(call) \
    149         ({ \
    150                 ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); \
    151                 tos; \
    152         })
     128#define ICMP_GET_TOS(call)  ((ip_tos_t) IPC_GET_ARG4(call))
    153129
    154 /** Returns the dont fragment message parameter.
     130/** Return the dont fragment message parameter.
    155131 *
    156  * @param[in] call      The message call structure.
     132 * @param[in] call Message call structure.
    157133 */
    158 #define ICMP_GET_DONT_FRAGMENT(call) \
    159         ({ \
    160                 int dont_fragment = (int) IPC_GET_ARG5(call); \
    161                 dont_fragment; \
    162         })
     134#define ICMP_GET_DONT_FRAGMENT(call)  ((int) IPC_GET_ARG5(call))
    163135
    164136/*@}*/
Note: See TracChangeset for help on using the changeset viewer.