Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4714 → Rev 4715

/branches/network/uspace/srv/net/il/icmp/icmp.h
37,15 → 37,35
#ifndef __NET_ICMP_H__
#define __NET_ICMP_H__
 
#include <atomic.h>
#include <fibril_sync.h>
 
#include "../../socket/socket_core.h"
#include "../../include/icmp_codes.h"
 
#include "../../structures/int_map.h"
#include "../../structures/generic_field.h"
 
#include "icmp_header.h"
 
/** Type definition of the ICMP global data.
* @see icmp_globals
*/
typedef struct icmp_globals icmp_globals_t;
 
/** Timeout locks map.
* Maps message identifiers to timeout implementing atomic variables.
* Sending fibril waits for its associated atomic variable to be set nonzero.
* Receiving fibril sets the associated atomic variable with the return value.
*/
INT_MAP_DECLARE( time_locks, atomic_t );
 
/** Echo specific data field.
* Used for bundle modules.
* The bundle module gets an index to the assigned echo specific data while connecting.
* The index is used in the future semi-remote calls instead of the ICMP phone.
*/
GENERIC_FIELD_DECLARE( echo_data, icmp_echo_t );
 
/** ICMP global data.
*/
struct icmp_globals{
67,6 → 87,15
/** Networking module phone.
*/
int net_phone;
/** The last used identifier number.
*/
icmp_param_t last_used_id;
/** The budled modules assigned echo specific data.
*/
echo_data_t echo_data;
/** Echo timeout locks.
*/
time_locks_t time_locks;
/** Safety lock.
*/
fibril_rwlock_t lock;