Ignore:
File:
1 edited

Legend:

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

    r4e5c7ba r849ed54  
    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
    42 #include <net/icmp_codes.h>
    43 #include <net/packet.h>
     42#include <icmp_codes.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;
     50
     51/** Type definition of the ICMP reply data pointer.
     52 *  @see icmp_reply
     53 */
     54typedef icmp_reply_t *  icmp_reply_ref;
    5155
    5256/** Type definition of the ICMP global data.
    53  * @see icmp_globals
     57 *  @see icmp_globals
    5458 */
    55 typedef struct icmp_globals icmp_globals_t;
     59typedef struct icmp_globals     icmp_globals_t;
    5660
    5761/** Pending replies map.
    58  *
    59  * Maps message identifiers to the pending replies.
    60  * Sending fibril waits for its associated reply event.
    61  * Receiving fibril sets the associated reply with the return value and signals
    62  * 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.
    6365 */
    6466INT_MAP_DECLARE(icmp_replies, icmp_reply_t);
    6567
    6668/** Echo specific data map.
    67  *
    68  * The identifier is used in the future semi-remote calls instead of the ICMP
    69  * phone.
     69 *  The bundle module gets an identifier of the assigned echo specific data while connecting.
     70 *  The identifier is used in the future semi-remote calls instead of the ICMP phone.
    7071 */
    7172INT_MAP_DECLARE(icmp_echo_data, icmp_echo_t);
    7273
    73 /** ICMP reply data. */
    74 struct icmp_reply {
    75         /** Reply result. */
     74/** ICMP reply data.
     75 */
     76struct icmp_reply{
     77        /** Reply result.
     78         */
    7679        int result;
    77         /** Safety lock. */
     80        /** Safety lock.
     81         */
    7882        fibril_mutex_t mutex;
    79         /** Received or timeouted reply signaling. */
     83        /** Received or timeouted reply signaling.
     84         */
    8085        fibril_condvar_t condvar;
    8186};
    8287
    83 /** ICMP global data. */
    84 struct icmp_globals {
    85         /** IP module phone. */
     88/** ICMP global data.
     89 */
     90struct  icmp_globals{
     91        /** IP module phone.
     92         */
    8693        int ip_phone;
    87         /** Packet dimension. */
     94        /** Packet dimension.
     95         */
    8896        packet_dimension_t packet_dimension;
    89         /** Networking module phone. */
     97        /** Networking module phone.
     98         */
    9099        int net_phone;
    91         /** Indicates whether ICMP error reporting is enabled. */
     100        /** Indicates whether ICMP error reporting is enabled.
     101         */
    92102        int error_reporting;
    93         /** Indicates whether ICMP echo replying (ping) is enabled. */
     103        /** Indicates whether ICMP echo replying (ping) is enabled.
     104         */
    94105        int echo_replying;
    95         /** The last used identifier number. */
     106        /** The last used identifier number.
     107         */
    96108        icmp_param_t last_used_id;
    97         /** The budled modules assigned echo specific data. */
     109        /** The budled modules assigned echo specific data.
     110         */
    98111        icmp_echo_data_t echo_data;
    99         /** Echo timeout locks. */
     112        /** Echo timeout locks.
     113         */
    100114        icmp_replies_t replies;
    101         /** Safety lock. */
     115        /** Safety lock.
     116         */
    102117        fibril_rwlock_t lock;
    103118};
     
    107122/** @}
    108123 */
     124
Note: See TracChangeset for help on using the changeset viewer.