Changeset fab2746 in mainline for uspace/srv/net/udp/udp_type.h
- Timestamp:
- 2015-04-08T21:25:30Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 99ea91b2
- Parents:
- ba0eac5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/udp_type.h
rba0eac5 rfab2746 36 36 #define UDP_TYPE_H 37 37 38 #include <async.h> 38 39 #include <fibril.h> 39 40 #include <fibril_synch.h> 40 41 #include <ipc/loc.h> 41 #include <socket_core.h>42 42 #include <sys/types.h> 43 43 #include <inet/addr.h> … … 99 99 100 100 typedef struct { 101 async_sess_t *sess; 102 socket_cores_t sockets; 103 } udp_client_t; 101 void (*recv_msg)(void *, udp_sockpair_t *, udp_msg_t *); 102 } udp_assoc_cb_t; 104 103 105 104 /** UDP association … … 131 130 /** Receive queue CV. Broadcast when new datagram is inserted */ 132 131 fibril_condvar_t rcv_queue_cv; 132 133 udp_assoc_cb_t *cb; 134 void *cb_arg; 133 135 } udp_assoc_t; 134 136 135 137 typedef struct { 136 138 } udp_assoc_status_t; 137 138 typedef struct udp_sockdata {139 /** Lock */140 fibril_mutex_t lock;141 /** Socket core */142 socket_core_t *sock_core;143 /** Client */144 udp_client_t *client;145 /** Connection */146 udp_assoc_t *assoc;147 /** User-configured IP link */148 service_id_t iplink;149 /** Receiving fibril */150 fid_t recv_fibril;151 uint8_t recv_buffer[UDP_FRAGMENT_SIZE];152 size_t recv_buffer_used;153 udp_sock_t recv_fsock;154 fibril_mutex_t recv_buffer_lock;155 fibril_condvar_t recv_buffer_cv;156 udp_error_t recv_error;157 } udp_sockdata_t;158 139 159 140 typedef struct { … … 166 147 } udp_rcv_queue_entry_t; 167 148 149 typedef struct udp_cassoc { 150 /** Association */ 151 udp_assoc_t *assoc; 152 /** Association ID for the client */ 153 sysarg_t id; 154 /** Client */ 155 struct udp_client *client; 156 link_t lclient; 157 } udp_cassoc_t; 158 159 typedef struct { 160 /** Link to receive queue */ 161 link_t link; 162 /** Socket pair */ 163 udp_sockpair_t sp; 164 /** Message */ 165 udp_msg_t *msg; 166 /** Client association */ 167 udp_cassoc_t *cassoc; 168 } udp_crcv_queue_entry_t; 169 170 typedef struct udp_client { 171 /** Client callback session */ 172 async_sess_t *sess; 173 /** Client assocations */ 174 list_t cassoc; /* of udp_cassoc_t */ 175 /** Client receive queue */ 176 list_t crcv_queue; 177 } udp_client_t; 178 168 179 #endif 169 180
Note:
See TracChangeset
for help on using the changeset viewer.