Changeset 2f19103 in mainline for uspace/srv/net/udp/udp_type.h
- Timestamp:
- 2015-05-22T07:21:37Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 58e9dec
- Parents:
- bf7587b0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/udp_type.h
rbf7587b0 r2f19103 1 1 /* 2 * Copyright (c) 201 2Jiri Svoboda2 * Copyright (c) 2015 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 39 39 #include <fibril.h> 40 40 #include <fibril_synch.h> 41 #include <inet/endpoint.h> 41 42 #include <ipc/loc.h> 42 43 #include <sys/types.h> … … 49 50 /* Insufficient resources */ 50 51 UDP_ENORES, 51 /* Foreign socket unspecified */52 /* Remote endpoint unspecified */ 52 53 UDP_EUNSPEC, 53 54 /* No route to destination */ … … 64 65 UDP_PORT_ANY = 0 65 66 }; 66 67 typedef struct {68 inet_addr_t addr;69 uint16_t port;70 } udp_sock_t;71 72 typedef struct {73 service_id_t iplink;74 udp_sock_t local;75 udp_sock_t foreign;76 } udp_sockpair_t;77 67 78 68 /** Unencoded UDP message (datagram) */ … … 99 89 100 90 typedef struct { 101 void (*recv_msg)(void *, udp_sockpair_t *, udp_msg_t *);91 void (*recv_msg)(void *, inet_ep2_t *, udp_msg_t *); 102 92 } udp_assoc_cb_t; 103 93 … … 106 96 * This is a rough equivalent of a TCP connection endpoint. It allows 107 97 * sending and receiving UDP datagrams and it is uniquely identified 108 * by a socket pair.98 * by an endpoint pair. 109 99 */ 110 100 typedef struct { … … 112 102 link_t link; 113 103 114 /** Association identification ( local and foreign socket) */115 udp_sockpair_t ident;104 /** Association identification (endpoint pair) */ 105 inet_ep2_t ident; 116 106 117 107 /** True if association was reset by user */ … … 141 131 /** Link to receive queue */ 142 132 link_t link; 143 /** Socket pair */144 udp_sockpair_t sp;133 /** Endpoint pair */ 134 inet_ep2_t epp; 145 135 /** Message */ 146 136 udp_msg_t *msg; … … 160 150 /** Link to receive queue */ 161 151 link_t link; 162 /** Socket pair */163 udp_sockpair_t sp;152 /** Endpoint pair */ 153 inet_ep2_t epp; 164 154 /** Message */ 165 155 udp_msg_t *msg;
Note:
See TracChangeset
for help on using the changeset viewer.