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


Ignore:
Timestamp:
2011-01-09T23:24:53Z (15 years ago)
Author:
martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4b86dac
Parents:
3c106e88
Message:

partial networking stack overhaul

  • a lot of coding style changes (comments, indentation, etc.)
  • convert several ints to unsigned ints or size_t values
  • streamline many of the IPC-related macros (they no longer dereference the call structure by themselves)
  • get rid of netif_interface.h (containing only aliases for remote functions and not serving any purpose)
  • rename netif_local.{c|h} to netif_skel.{c|h} (it is really just a skeleton)
  • drop the "_remote" and "_standalone" suffixes from most of the netif_ functions (they do not serve any purpose anymore)
  • implement netif_client_connection() as a common framework function for all netif modules
    • update the lo module accordingly
  • ip module now reports the default gateway to the user whenever it is being set
File:
1 edited

Legend:

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

    r3c106e88 r774e6d1a  
    5151         */
    5252        NET_IP_ADD_ROUTE = NET_IP_FIRST,
     53       
    5354        /** Gets the actual route information.
    5455         * @see ip_get_route()
    5556         */
    5657        NET_IP_GET_ROUTE,
     58       
    5759        /** Processes the received error notification.
    5860         * @see ip_received_error_msg()
    5961         */
    6062        NET_IP_RECEIVED_ERROR,
     63       
    6164        /** Sets the default gateway.
    6265         * @see ip_set_default_gateway()
     
    6871/*@{*/
    6972
    70 /** Returns the address message parameter.
    71  * @param[in] call The message call structure.
     73/** Return the address message parameter.
     74 *
     75 * @param[in] call Message call structure.
     76 *
    7277 */
    7378#define IP_GET_ADDRESS(call) \
    7479        ({ \
    7580                in_addr_t addr; \
    76                 addr.s_addr = IPC_GET_ARG3(*call); \
     81                addr.s_addr = IPC_GET_ARG3(call); \
    7782                addr; \
    7883        })
    7984
    80 /** Returns the gateway message parameter.
    81  * @param[in] call The message call structure.
     85/** Return the gateway message parameter.
     86 *
     87 * @param[in] call Message call structure.
     88 *
    8289 */
    8390#define IP_GET_GATEWAY(call) \
    8491        ({ \
    8592                in_addr_t addr; \
    86                 addr.s_addr = IPC_GET_ARG2(*call); \
     93                addr.s_addr = IPC_GET_ARG2(call); \
    8794                addr; \
    8895        })
    8996
    90 /** Sets the header length in the message answer.
    91  * @param[out] answer The message answer structure.
     97/** Set the header length in the message answer.
     98 *
     99 * @param[out] answer Message answer structure.
     100 *
    92101 */
    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)
     102#define IP_SET_HEADERLEN(answer, value)  IPC_SET_ARG2(answer, (sysarg_t) (value))
    98103
    99 /** Returns the network mask message parameter.
    100  * @param[in] call The message call structure.
     104/** Return the network mask message parameter.
     105 *
     106 * @param[in] call Message call structure.
     107 *
    101108 */
    102109#define IP_GET_NETMASK(call) \
    103110        ({ \
    104111                in_addr_t addr; \
    105                 addr.s_addr = IPC_GET_ARG4(*call); \
     112                addr.s_addr = IPC_GET_ARG4(call); \
    106113                addr; \
    107114        })
    108115
    109 /** Returns the protocol message parameter.
    110  * @param[in] call The message call structure.
     116/** Return the protocol message parameter.
     117 *
     118 * @param[in] call Message call structure.
     119 *
    111120 */
    112 #define IP_GET_PROTOCOL(call) \
    113         ({ \
    114                 ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); \
    115                 protocol; \
    116         })
     121#define IP_GET_PROTOCOL(call)  ((ip_protocol_t) IPC_GET_ARG1(call))
    117122
    118123/*@}*/
Note: See TracChangeset for help on using the changeset viewer.