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


Ignore:
Timestamp:
2010-11-02T22:38:46Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af894a21
Parents:
aab02fb (diff), e06ef614 (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/ip.h

    raab02fb refedee77  
    2727 */
    2828
    29 /** @addtogroup ip
    30  *  @{
     29/** @addtogroup libc
     30 * @{
    3131 */
    3232
    3333/** @file
    34  *  IP module messages.
    35  *  @see ip_interface.h
     34 * IP module messages.
     35 * @see ip_interface.h
    3636 */
    3737
    38 #ifndef __NET_IP_MESSAGES_H__
    39 #define __NET_IP_MESSAGES_H__
     38#ifndef LIBC_IP_MESSAGES_H_
     39#define LIBC_IP_MESSAGES_H_
    4040
    4141#include <ipc/ipc.h>
     42#include <ipc/net.h>
    4243
    43 #include <in.h>
    44 #include <ip_codes.h>
     44#include <net/in.h>
     45#include <net/ip_codes.h>
    4546
    46 /** IP module messages.
    47  */
    48 typedef enum{
     47/** IP module messages. */
     48typedef enum {
    4949        /** Adds the routing entry.
    50          *  @see ip_add_route()
     50         * @see ip_add_route()
    5151         */
    5252        NET_IP_ADD_ROUTE = NET_IP_FIRST,
    5353        /** Gets the actual route information.
    54          *  @see ip_get_route()
     54         * @see ip_get_route()
    5555         */
    5656        NET_IP_GET_ROUTE,
    5757        /** Processes the received error notification.
    58          *  @see ip_received_error_msg()
     58         * @see ip_received_error_msg()
    5959         */
    6060        NET_IP_RECEIVED_ERROR,
    6161        /** Sets the default gateway.
    62          *  @see ip_set_default_gateway()
     62         * @see ip_set_default_gateway()
    6363         */
    6464        NET_IP_SET_GATEWAY
    6565} ip_messages;
    6666
    67 /** @name IP specific message parameters definitions
    68  */
     67/** @name IP specific message parameters definitions */
    6968/*@{*/
    7069
    7170/** Returns the address message parameter.
    72  *  @param[in] call The message call structure.
     71 * @param[in] call The message call structure.
    7372 */
    7473#define IP_GET_ADDRESS(call) \
    75         ({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})
     74        ({ \
     75                in_addr_t addr; \
     76                addr.s_addr = IPC_GET_ARG3(*call); \
     77                addr; \
     78        })
    7679
    7780/** Returns the gateway message parameter.
    78  *  @param[in] call The message call structure.
     81 * @param[in] call The message call structure.
    7982 */
    8083#define IP_GET_GATEWAY(call) \
    81         ({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;})
     84        ({ \
     85                in_addr_t addr; \
     86                addr.s_addr = IPC_GET_ARG2(*call); \
     87                addr; \
     88        })
    8289
    8390/** Sets the header length in the message answer.
    84  *  @param[out] answer The message answer structure.
     91 * @param[out] answer The message answer structure.
    8592 */
    8693#define IP_SET_HEADERLEN(answer, value) \
    87         {ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}
     94        do { \
     95                ipcarg_t argument = (ipcarg_t) (value); \
     96                IPC_SET_ARG2(*answer, argument); \
     97        } while (0)
    8898
    8999/** Returns the network mask message parameter.
    90  *  @param[in] call The message call structure.
     100 * @param[in] call The message call structure.
    91101 */
    92102#define IP_GET_NETMASK(call) \
    93         ({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;})
     103        ({ \
     104                in_addr_t addr; \
     105                addr.s_addr = IPC_GET_ARG4(*call); \
     106                addr; \
     107        })
    94108
    95109/** Returns the protocol message parameter.
    96  *  @param[in] call The message call structure.
     110 * @param[in] call The message call structure.
    97111 */
    98112#define IP_GET_PROTOCOL(call) \
    99         ({ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); protocol;})
     113        ({ \
     114                ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \
     115                protocol; \
     116        })
    100117
    101118/*@}*/
Note: See TracChangeset for help on using the changeset viewer.