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


Ignore:
Timestamp:
2010-10-19T20:55:53Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a93d79a
Parents:
1882525 (diff), a7a85d16 (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 moved

Legend:

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

    r1882525 rf14291b  
    2727 */
    2828
    29 /** @addtogroup icmp
    30  *  @{
     29/** @addtogroup libc
     30 * @{
    3131 */
    3232
    3333/** @file
    34  *  ICMP module messages.
    35  *  @see icmp_interface.h
     34 * ICMP module messages.
     35 * @see icmp_interface.h
    3636 */
    3737
    38 #ifndef __NET_ICMP_MESSAGES__
    39 #define __NET_ICMP_MESSAGES__
     38#ifndef LIBC_ICMP_MESSAGES_
     39#define LIBC_ICMP_MESSAGES_
    4040
    4141#include <ipc/ipc.h>
     42#include <ipc/net.h>
    4243#include <sys/types.h>
     44#include <sys/time.h>
    4345
    44 #include <icmp_codes.h>
    45 #include <net_messages.h>
     46#include <net/icmp_codes.h>
    4647
    47 /** ICMP module messages.
    48  */
    49 typedef enum{
    50         /** Sends echo request.
    51          *  @see icmp_echo()
    52          */
     48/** ICMP module messages. */
     49typedef enum {
     50        /** Sends echo request. @see icmp_echo() */
    5351        NET_ICMP_ECHO = NET_ICMP_FIRST,
    54         /** Sends destination unreachable error message.
    55          *  @see icmp_destination_unreachable_msg()
     52       
     53        /**
     54         * Sends destination unreachable error message.
     55         * @see icmp_destination_unreachable_msg()
    5656         */
    5757        NET_ICMP_DEST_UNREACH,
    58         /** Sends source quench error message.
    59          *  @see icmp_source_quench_msg()
     58       
     59        /**
     60         * Sends source quench error message.
     61         * @see icmp_source_quench_msg()
    6062         */
    6163        NET_ICMP_SOURCE_QUENCH,
    62         /** Sends time exceeded error message.
    63          *  @see icmp_time_exceeded_msg()
     64       
     65        /**
     66         * Sends time exceeded error message.
     67         * @see icmp_time_exceeded_msg()
    6468         */
    6569        NET_ICMP_TIME_EXCEEDED,
    66         /** Sends parameter problem error message.
    67          *  @see icmp_parameter_problem_msg()
     70       
     71        /**
     72         * Sends parameter problem error message.
     73         * @see icmp_parameter_problem_msg()
    6874         */
    6975        NET_ICMP_PARAMETERPROB,
    70         /** Initializes new connection.
    71         */
     76       
     77        /** Initializes new connection. */
    7278        NET_ICMP_INIT
    7379} icmp_messages;
    7480
    75 /** @name ICMP specific message parameters definitions
    76  */
     81/** @name ICMP specific message parameters definitions */
    7782/*@{*/
    7883
    7984/** Returns the ICMP code message parameter.
    80  *  @param[in] call The message call structure.
     85 *
     86 * @param[in] call      The message call structure.
    8187 */
    8288#define ICMP_GET_CODE(call) \
    83         ({icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); code;})
     89        ({ \
     90                icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); \
     91                code; \
     92        })
    8493
    8594/** Returns the ICMP link MTU message parameter.
    86  *  @param[in] call The message call structure.
     95 *
     96 * @param[in] call      The message call structure.
    8797 */
    8898#define ICMP_GET_MTU(call) \
    89         ({icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); mtu;})
     99        ({ \
     100                icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); \
     101                mtu; \
     102        })
    90103
    91104/** Returns the pointer message parameter.
    92  *  @param[in] call The message call structure.
     105 *
     106 * @param[in] call      The message call structure.
    93107 */
    94108#define ICMP_GET_POINTER(call) \
    95         ({icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); pointer;})
     109        ({ \
     110                icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); \
     111                pointer; \
     112        })
    96113
    97114/** Returns the size message parameter.
    98  *  @param[in] call The message call structure.
     115 *
     116 * @param[in] call      The message call structure.
    99117 */
    100118#define ICMP_GET_SIZE(call) \
    101         ({size_t size = (size_t) IPC_GET_ARG1(call); size;})
     119        ({ \
     120                size_t size = (size_t) IPC_GET_ARG1(call); \
     121                size; \
     122        })
    102123
    103124/** Returns the timeout message parameter.
    104  *  @param[in] call The message call structure.
     125 *
     126 * @param[in] call      The message call structure.
    105127 */
    106128#define ICMP_GET_TIMEOUT(call) \
    107         (({suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); timeout;}))
     129        ({ \
     130                suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); \
     131                timeout; \
     132        })
    108133
    109134/** Returns the time to live message parameter.
    110  *  @param[in] call The message call structure.
     135 *
     136 * @param[in] call      The message call structure.
    111137 */
    112138#define ICMP_GET_TTL(call) \
    113         ({ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); ttl;})
     139        ({ \
     140                ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); \
     141                ttl; \
     142        })
    114143
    115144/** Returns the type of service message parameter.
    116  *  @param[in] call The message call structure.
     145 *
     146 * @param[in] call      The message call structure.
    117147 */
    118148#define ICMP_GET_TOS(call) \
    119         ({ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); tos;})
     149        ({ \
     150                ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); \
     151                tos; \
     152        })
    120153
    121154/** Returns the dont fragment message parameter.
    122  *  @param[in] call The message call structure.
     155 *
     156 * @param[in] call      The message call structure.
    123157 */
    124158#define ICMP_GET_DONT_FRAGMENT(call) \
    125         ({int dont_fragment = (int) IPC_GET_ARG5(call); dont_fragment;})
     159        ({ \
     160                int dont_fragment = (int) IPC_GET_ARG5(call); \
     161                dont_fragment; \
     162        })
    126163
    127164/*@}*/
Note: See TracChangeset for help on using the changeset viewer.