Subversion Repositories HelenOS

Rev

Rev 4750 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4750 Rev 4756
Line 76... Line 76...
76
 */
76
 */
77
DEVICE_MAP_DECLARE( packet_dimensions, packet_dimension_t );
77
DEVICE_MAP_DECLARE( packet_dimensions, packet_dimension_t );
78
 
78
 
79
/** Gets the address port.
79
/** Gets the address port.
80
 *  Supports AF_INET and AF_INET6 address families.
80
 *  Supports AF_INET and AF_INET6 address families.
81
 *  @param addr The address to be updated. Input/output parameter.
81
 *  @param[in,out] addr The address to be updated.
82
 *  @param addrlen The address length. Input parameter.
82
 *  @param[in] addrlen The address length.
83
 *  @param port The set port. Output parameter.
83
 *  @param[out] port The set port.
84
 *  @returns EOK on success.
84
 *  @returns EOK on success.
85
 *  @returns EINVAL if the address length does not match the address family.
85
 *  @returns EINVAL if the address length does not match the address family.
86
 *  @returns EAFNOSUPPORT if the address family is not supported.
86
 *  @returns EAFNOSUPPORT if the address family is not supported.
87
 */
87
 */
88
int tl_get_address_port( const struct sockaddr * addr, int addrlen, uint16_t * port );
88
int tl_get_address_port( const struct sockaddr * addr, int addrlen, uint16_t * port );
Line 91... Line 91...
91
 *  Tries to search a cache and queries the IP module if not found.
91
 *  Tries to search a cache and queries the IP module if not found.
92
 *  The reply is cached then.
92
 *  The reply is cached then.
93
 *  @param[in] ip_phone The IP moduel phone for (semi)remote calls.
93
 *  @param[in] ip_phone The IP moduel phone for (semi)remote calls.
94
 *  @param[in] packet_dimensions The packet dimensions cache.
94
 *  @param[in] packet_dimensions The packet dimensions cache.
95
 *  @param[in] device_id The device identifier.
95
 *  @param[in] device_id The device identifier.
96
 *  @param[out] packet_dimention The IP packet dimensions.
96
 *  @param[out] packet_dimension The IP packet dimensions.
97
 *  @returns EOK on success.
97
 *  @returns EOK on success.
98
 *  @returns EBADMEM if the packet_dimension parameter is NULL.
98
 *  @returns EBADMEM if the packet_dimension parameter is NULL.
99
 *  @return ENOMEM if there is not enough memory left.
99
 *  @return ENOMEM if there is not enough memory left.
100
 *  @returns EINVAL if the packet_dimensions cache is not valid.
100
 *  @returns EINVAL if the packet_dimensions cache is not valid.
101
 *  @returns Other codes as defined for the ip_packet_size_req() function.
101
 *  @returns Other codes as defined for the ip_packet_size_req() function.
102
 */
102
 */
103
int tl_get_ip_packet_dimension( int ip_phone, packet_dimensions_ref packet_dimensions, device_id_t device_id, packet_dimension_ref * packet_dimension );
103
int tl_get_ip_packet_dimension( int ip_phone, packet_dimensions_ref packet_dimensions, device_id_t device_id, packet_dimension_ref * packet_dimension );
104
 
104
 
105
/** Sets the address port.
105
/** Sets the address port.
106
 *  Supports AF_INET and AF_INET6 address families.
106
 *  Supports AF_INET and AF_INET6 address families.
107
 *  @param addr The address to be updated. Input/output parameter.
107
 *  @param[in,out] addr The address to be updated.
108
 *  @param addrlen The address length. Input parameter.
108
 *  @param[in] addrlen The address length.
109
 *  @param port The port to be set. Input parameter.
109
 *  @param[in] port The port to be set.
110
 *  @returns EOK on success.
110
 *  @returns EOK on success.
111
 *  @returns EINVAL if the address length does not match the address family.
111
 *  @returns EINVAL if the address length does not match the address family.
112
 *  @returns EAFNOSUPPORT if the address family is not supported.
112
 *  @returns EAFNOSUPPORT if the address family is not supported.
113
 */
113
 */
114
int tl_set_address_port( struct sockaddr * addr, int addrlen, uint16_t port );
114
int tl_set_address_port( struct sockaddr * addr, int addrlen, uint16_t port );
115
 
115
 
116
/** Prepares the packet for ICMP error notification.
116
/** Prepares the packet for ICMP error notification.
117
 *  Keeps the first packet and releases all the others.
117
 *  Keeps the first packet and releases all the others.
118
 *  Releases all the packets on error.
118
 *  Releases all the packets on error.
119
 *  @param packet_phone The packet server module phone. Input parameter.
119
 *  @param[in] packet_phone The packet server module phone.
120
 *  @param icmp_phone The ICMP module phone. Input parameter.
120
 *  @param[in] icmp_phone The ICMP module phone.
121
 *  @param packet The packet to be send. Input parameter.
121
 *  @param[in] packet The packet to be send.
122
 *  @param error The packet error reporting service. Prefixes the received packet. Input parameter.
122
 *  @param[in] error The packet error reporting service. Prefixes the received packet.
123
 *  @returns EOK on success.
123
 *  @returns EOK on success.
124
 *  @returns ENOENT if no packet may be sent.
124
 *  @returns ENOENT if no packet may be sent.
125
 */
125
 */
126
int tl_prepare_icmp_packet( int packet_phone, int icmp_phone, packet_t packet, services_t error );
126
int tl_prepare_icmp_packet( int packet_phone, int icmp_phone, packet_t packet, services_t error );
127
 
127
 
128
/** Receives data from the socket into a packet.
128
/** Receives data from the socket into a packet.
129
 *  @param packet_phone The packet server module phone. Input parameter.
129
 *  @param[in] packet_phone The packet server module phone.
130
 *  @param packet The new created packet. Output parameter.
130
 *  @param[out] packet The new created packet.
131
 *  @param prefix Reserved packet data prefix length. Input parameter.
131
 *  @param[in] prefix Reserved packet data prefix length.
132
 *  @param dimension The packet dimension. Input parameter.
132
 *  @param[in] dimension The packet dimension.
133
 *  @param addr The destination address. Input parameter.
133
 *  @param[in] addr The destination address.
134
 *  @param addrlen The address length. Input parameter.
134
 *  @param[in] addrlen The address length.
135
 *  @returns Number of bytes received.
135
 *  @returns Number of bytes received.
136
 *  @returns EINVAL if the client does not send data.
136
 *  @returns EINVAL if the client does not send data.
137
 *  @returns ENOMEM if there is not enough memory left.
137
 *  @returns ENOMEM if there is not enough memory left.
138
 *  @returns Other error codes as defined for the ipc_data_read_finalize() function.
138
 *  @returns Other error codes as defined for the ipc_data_read_finalize() function.
139
 */
139
 */