Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/icmp/icmp.h

    redc5a985 r753bca3  
    2828
    2929/** @addtogroup icmp
    30  * @{
     30 *  @{
    3131 */
    3232
    3333/** @file
    34  * ICMP module.
     34 *  ICMP module.
    3535 */
    3636
    37 #ifndef NET_ICMP_H_
    38 #define NET_ICMP_H_
     37#ifndef __NET_ICMP_H__
     38#define __NET_ICMP_H__
    3939
    4040#include <fibril_synch.h>
    4141
    4242#include <net/icmp_codes.h>
    43 #include <net/packet.h>
    4443#include <adt/int_map.h>
    4544#include <icmp_header.h>
    4645
    4746/** Type definition of the ICMP reply data.
    48  * @see icmp_reply
     47 *  @see icmp_reply
    4948 */
    50 typedef struct icmp_reply icmp_reply_t;
     49typedef struct icmp_reply       icmp_reply_t;
    5150
    5251/** Type definition of the ICMP reply data pointer.
    53  * @see icmp_reply
     52 *  @see icmp_reply
    5453 */
    55 typedef icmp_reply_t *icmp_reply_ref;
     54typedef icmp_reply_t *  icmp_reply_ref;
    5655
    5756/** Type definition of the ICMP global data.
    58  * @see icmp_globals
     57 *  @see icmp_globals
    5958 */
    60 typedef struct icmp_globals icmp_globals_t;
     59typedef struct icmp_globals     icmp_globals_t;
    6160
    6261/** Pending replies map.
    63  *
    64  * Maps message identifiers to the pending replies.
    65  * Sending fibril waits for its associated reply event.
    66  * Receiving fibril sets the associated reply with the return value and signals
    67  * the event.
     62 *  Maps message identifiers to the pending replies.
     63 *  Sending fibril waits for its associated reply event.
     64 *  Receiving fibril sets the associated reply with the return value and signals the event.
    6865 */
    6966INT_MAP_DECLARE(icmp_replies, icmp_reply_t);
    7067
    7168/** Echo specific data map.
    72  *
    73  * The identifier is used in the future semi-remote calls instead of the ICMP
    74  * phone.
     69 *  The identifier is used in the future semi-remote calls instead of the ICMP phone.
    7570 */
    7671INT_MAP_DECLARE(icmp_echo_data, icmp_echo_t);
    7772
    78 /** ICMP reply data. */
    79 struct icmp_reply {
    80         /** Reply result. */
     73/** ICMP reply data.
     74 */
     75struct icmp_reply{
     76        /** Reply result.
     77         */
    8178        int result;
    82         /** Safety lock. */
     79        /** Safety lock.
     80         */
    8381        fibril_mutex_t mutex;
    84         /** Received or timeouted reply signaling. */
     82        /** Received or timeouted reply signaling.
     83         */
    8584        fibril_condvar_t condvar;
    8685};
    8786
    88 /** ICMP global data. */
    89 struct icmp_globals {
    90         /** IP module phone. */
     87/** ICMP global data.
     88 */
     89struct  icmp_globals{
     90        /** IP module phone.
     91         */
    9192        int ip_phone;
    92         /** Packet dimension. */
     93        /** Packet dimension.
     94         */
    9395        packet_dimension_t packet_dimension;
    94         /** Networking module phone. */
     96        /** Networking module phone.
     97         */
    9598        int net_phone;
    96         /** Indicates whether ICMP error reporting is enabled. */
     99        /** Indicates whether ICMP error reporting is enabled.
     100         */
    97101        int error_reporting;
    98         /** Indicates whether ICMP echo replying (ping) is enabled. */
     102        /** Indicates whether ICMP echo replying (ping) is enabled.
     103         */
    99104        int echo_replying;
    100         /** The last used identifier number. */
     105        /** The last used identifier number.
     106         */
    101107        icmp_param_t last_used_id;
    102         /** The budled modules assigned echo specific data. */
     108        /** The budled modules assigned echo specific data.
     109         */
    103110        icmp_echo_data_t echo_data;
    104         /** Echo timeout locks. */
     111        /** Echo timeout locks.
     112         */
    105113        icmp_replies_t replies;
    106         /** Safety lock. */
     114        /** Safety lock.
     115         */
    107116        fibril_rwlock_t lock;
    108117};
     
    112121/** @}
    113122 */
     123
Note: See TracChangeset for help on using the changeset viewer.