Changes in uspace/srv/net/tl/icmp/icmp.h [4e5c7ba:849ed54] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.h
r4e5c7ba r849ed54 28 28 29 29 /** @addtogroup icmp 30 * @{30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * ICMP module.34 * ICMP module. 35 35 */ 36 36 37 #ifndef NET_ICMP_H_38 #define NET_ICMP_H_37 #ifndef __NET_ICMP_H__ 38 #define __NET_ICMP_H__ 39 39 40 40 #include <fibril_synch.h> 41 41 42 #include <net/icmp_codes.h> 43 #include <net/packet.h> 42 #include <icmp_codes.h> 44 43 #include <adt/int_map.h> 45 44 #include <icmp_header.h> 46 45 47 46 /** Type definition of the ICMP reply data. 48 * @see icmp_reply47 * @see icmp_reply 49 48 */ 50 typedef struct icmp_reply icmp_reply_t; 49 typedef struct icmp_reply icmp_reply_t; 50 51 /** Type definition of the ICMP reply data pointer. 52 * @see icmp_reply 53 */ 54 typedef icmp_reply_t * icmp_reply_ref; 51 55 52 56 /** Type definition of the ICMP global data. 53 * @see icmp_globals57 * @see icmp_globals 54 58 */ 55 typedef struct icmp_globals 59 typedef struct icmp_globals icmp_globals_t; 56 60 57 61 /** 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. 63 65 */ 64 66 INT_MAP_DECLARE(icmp_replies, icmp_reply_t); 65 67 66 68 /** 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. 70 71 */ 71 72 INT_MAP_DECLARE(icmp_echo_data, icmp_echo_t); 72 73 73 /** ICMP reply data. */ 74 struct icmp_reply { 75 /** Reply result. */ 74 /** ICMP reply data. 75 */ 76 struct icmp_reply{ 77 /** Reply result. 78 */ 76 79 int result; 77 /** Safety lock. */ 80 /** Safety lock. 81 */ 78 82 fibril_mutex_t mutex; 79 /** Received or timeouted reply signaling. */ 83 /** Received or timeouted reply signaling. 84 */ 80 85 fibril_condvar_t condvar; 81 86 }; 82 87 83 /** ICMP global data. */ 84 struct icmp_globals { 85 /** IP module phone. */ 88 /** ICMP global data. 89 */ 90 struct icmp_globals{ 91 /** IP module phone. 92 */ 86 93 int ip_phone; 87 /** Packet dimension. */ 94 /** Packet dimension. 95 */ 88 96 packet_dimension_t packet_dimension; 89 /** Networking module phone. */ 97 /** Networking module phone. 98 */ 90 99 int net_phone; 91 /** Indicates whether ICMP error reporting is enabled. */ 100 /** Indicates whether ICMP error reporting is enabled. 101 */ 92 102 int error_reporting; 93 /** Indicates whether ICMP echo replying (ping) is enabled. */ 103 /** Indicates whether ICMP echo replying (ping) is enabled. 104 */ 94 105 int echo_replying; 95 /** The last used identifier number. */ 106 /** The last used identifier number. 107 */ 96 108 icmp_param_t last_used_id; 97 /** The budled modules assigned echo specific data. */ 109 /** The budled modules assigned echo specific data. 110 */ 98 111 icmp_echo_data_t echo_data; 99 /** Echo timeout locks. */ 112 /** Echo timeout locks. 113 */ 100 114 icmp_replies_t replies; 101 /** Safety lock. */ 115 /** Safety lock. 116 */ 102 117 fibril_rwlock_t lock; 103 118 }; … … 107 122 /** @} 108 123 */ 124
Note:
See TracChangeset
for help on using the changeset viewer.