Subversion Repositories HelenOS

Rev

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

Rev 4731 Rev 4750
Line 37... Line 37...
37
#ifndef __NET_TL_COMMON_H__
37
#ifndef __NET_TL_COMMON_H__
38
#define __NET_TL_COMMON_H__
38
#define __NET_TL_COMMON_H__
39
 
39
 
40
#include "../structures/packet/packet.h"
40
#include "../structures/packet/packet.h"
41
 
41
 
-
 
42
#include "../include/device.h"
42
#include "../include/inet.h"
43
#include "../include/inet.h"
43
#include "../include/socket_codes.h"
44
#include "../include/socket_codes.h"
44
 
45
 
45
/** Type definition of the packet dimension.
46
/** Type definition of the packet dimension.
46
 *  @see packet_dimension
47
 *  @see packet_dimension
Line 67... Line 68...
67
    /** Maximal packet address length.
68
    /** Maximal packet address length.
68
     */
69
     */
69
    size_t          addr_len;
70
    size_t          addr_len;
70
};
71
};
71
 
72
 
-
 
73
/** Device packet dimensions.
-
 
74
 *  Maps devices to the packet dimensions.
-
 
75
 *  @see device.h
-
 
76
 */
-
 
77
DEVICE_MAP_DECLARE( packet_dimensions, packet_dimension_t );
-
 
78
 
72
/** Gets the address port.
79
/** Gets the address port.
73
 *  Supports AF_INET and AF_INET6 address families.
80
 *  Supports AF_INET and AF_INET6 address families.
74
 *  @param addr The address to be updated. Input/output parameter.
81
 *  @param addr The address to be updated. Input/output parameter.
75
 *  @param addrlen The address length. Input parameter.
82
 *  @param addrlen The address length. Input parameter.
76
 *  @param port The set port. Output parameter.
83
 *  @param port The set port. Output parameter.
Line 78... Line 85...
78
 *  @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.
79
 *  @returns EAFNOSUPPORT if the address family is not supported.
86
 *  @returns EAFNOSUPPORT if the address family is not supported.
80
 */
87
 */
81
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 );
82
 
89
 
-
 
90
/** Gets IP packet dimensions.
-
 
91
 *  Tries to search a cache and queries the IP module if not found.
-
 
92
 *  The reply is cached then.
-
 
93
 *  @param[in] ip_phone The IP moduel phone for (semi)remote calls.
-
 
94
 *  @param[in] packet_dimensions The packet dimensions cache.
-
 
95
 *  @param[in] device_id The device identifier.
-
 
96
 *  @param[out] packet_dimention The IP packet dimensions.
-
 
97
 *  @returns EOK on success.
-
 
98
 *  @returns EBADMEM if the packet_dimension parameter is NULL.
-
 
99
 *  @return ENOMEM if there is not enough memory left.
-
 
100
 *  @returns EINVAL if the packet_dimensions cache is not valid.
-
 
101
 *  @returns Other codes as defined for the ip_packet_size_req() function.
-
 
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 );
-
 
104
 
83
/** Sets the address port.
105
/** Sets the address port.
84
 *  Supports AF_INET and AF_INET6 address families.
106
 *  Supports AF_INET and AF_INET6 address families.
85
 *  @param addr The address to be updated. Input/output parameter.
107
 *  @param addr The address to be updated. Input/output parameter.
86
 *  @param addrlen The address length. Input parameter.
108
 *  @param addrlen The address length. Input parameter.
87
 *  @param port The port to be set. Input parameter.
109
 *  @param port The port to be set. Input parameter.