Subversion Repositories HelenOS

Rev

Rev 4707 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4707 Rev 4715
Line 35... Line 35...
35
 */
35
 */
36
 
36
 
37
#ifndef __NET_ICMP_H__
37
#ifndef __NET_ICMP_H__
38
#define __NET_ICMP_H__
38
#define __NET_ICMP_H__
39
 
39
 
-
 
40
#include <atomic.h>
40
#include <fibril_sync.h>
41
#include <fibril_sync.h>
41
 
42
 
42
#include "../../socket/socket_core.h"
43
#include "../../include/icmp_codes.h"
-
 
44
 
-
 
45
#include "../../structures/int_map.h"
-
 
46
#include "../../structures/generic_field.h"
-
 
47
 
-
 
48
#include "icmp_header.h"
43
 
49
 
44
/** Type definition of the ICMP global data.
50
/** Type definition of the ICMP global data.
45
 *  @see icmp_globals
51
 *  @see icmp_globals
46
 */
52
 */
47
typedef struct icmp_globals icmp_globals_t;
53
typedef struct icmp_globals icmp_globals_t;
48
 
54
 
-
 
55
/** Timeout locks map.
-
 
56
 *  Maps message identifiers to timeout implementing atomic variables.
-
 
57
 *  Sending fibril waits for its associated atomic variable to be set nonzero.
-
 
58
 *  Receiving fibril sets the associated atomic variable with the return value.
-
 
59
 */
-
 
60
INT_MAP_DECLARE( time_locks, atomic_t );
-
 
61
 
-
 
62
/** Echo specific data field.
-
 
63
 *  Used for bundle modules.
-
 
64
 *  The bundle module gets an index to the assigned echo specific data while connecting.
-
 
65
 *  The index is used in the future semi-remote calls instead of the ICMP phone.
-
 
66
 */
-
 
67
GENERIC_FIELD_DECLARE( echo_data, icmp_echo_t );
-
 
68
 
49
/** ICMP global data.
69
/** ICMP global data.
50
 */
70
 */
51
struct  icmp_globals{
71
struct  icmp_globals{
52
    /** IP module phone.
72
    /** IP module phone.
53
     */
73
     */
Line 65... Line 85...
65
     */
85
     */
66
    size_t          addr_len;
86
    size_t          addr_len;
67
    /** Networking module phone.
87
    /** Networking module phone.
68
     */
88
     */
69
    int             net_phone;
89
    int             net_phone;
-
 
90
    /** The last used identifier number.
-
 
91
     */
-
 
92
    icmp_param_t    last_used_id;
-
 
93
    /** The budled modules assigned echo specific data.
-
 
94
     */
-
 
95
    echo_data_t     echo_data;
-
 
96
    /** Echo timeout locks.
-
 
97
     */
-
 
98
    time_locks_t    time_locks;
70
    /** Safety lock.
99
    /** Safety lock.
71
     */
100
     */
72
    fibril_rwlock_t lock;
101
    fibril_rwlock_t lock;
73
};
102
};
74
 
103