Changeset 849ed54 in mainline for uspace/lib/net
- Timestamp:
- 2010-03-30T18:39:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7553689
- Parents:
- 7d6fe4db
- Location:
- uspace/lib/net
- Files:
-
- 6 added
- 43 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/adt/module_map.c
r7d6fe4db r849ed54 41 41 #include <ipc/services.h> 42 42 43 #include "../err.h"44 #include "../modules.h"43 #include <net_err.h> 44 #include <net_modules.h> 45 45 46 #include "generic_char_map.h"47 #include "module_map.h"46 #include <adt/generic_char_map.h> 47 #include <adt/module_map.h> 48 48 49 49 GENERIC_CHAR_MAP_IMPLEMENT(modules, module_t) -
uspace/lib/net/generic/net_checksum.c
r7d6fe4db r849ed54 37 37 #include <sys/types.h> 38 38 39 #include "include/checksum.h"39 #include <net_checksum.h> 40 40 41 41 /** Big-endian encoding CRC divider. -
uspace/lib/net/generic/net_remote.c
r7d6fe4db r849ed54 40 40 #include <malloc.h> 41 41 42 #include "../messages.h" 43 #include "../modules.h" 44 45 #include "../include/device.h" 46 #include "../include/net_interface.h" 47 48 #include "../structures/measured_strings.h" 49 50 #include "net_messages.h" 42 #include <net_messages.h> 43 #include <net_modules.h> 44 #include <net_device.h> 45 #include <net_interface.h> 46 #include <adt/measured_strings.h> 47 #include <net_net_messages.h> 51 48 52 49 int net_connect_module(services_t service){ -
uspace/lib/net/generic/packet_remote.c
r7d6fe4db r849ed54 38 38 #include <async.h> 39 39 #include <errno.h> 40 41 40 #include <ipc/ipc.h> 42 41 #include <sys/mman.h> 43 42 44 #include "../../err.h" 45 #include "../../messages.h" 46 47 #include "packet.h" 48 #include "packet_client.h" 49 #include "packet_header.h" 50 #include "packet_messages.h" 43 #include <net_err.h> 44 #include <net_messages.h> 45 #include <packet/packet.h> 46 #include <packet/packet_client.h> 47 #include <packet/packet_header.h> 48 #include <packet/packet_messages.h> 51 49 52 50 /** Obtains the packet from the packet server as the shared memory block. -
uspace/lib/net/il/arp_remote.c
r7d6fe4db r849ed54 38 38 #include <async.h> 39 39 #include <errno.h> 40 41 40 #include <ipc/ipc.h> 42 41 #include <ipc/services.h> 43 42 44 #include "../../messages.h" 45 #include "../../modules.h" 46 47 #include "../../include/device.h" 48 #include "../../include/arp_interface.h" 49 50 #include "../../structures/measured_strings.h" 51 52 #include "arp_messages.h" 43 #include <net_messages.h> 44 #include <net_modules.h> 45 #include <net_device.h> 46 #include <arp_interface.h> 47 #include <adt/measured_strings.h> 48 #include <arp_messages.h> 53 49 54 50 int arp_connect_module(services_t service){ -
uspace/lib/net/il/ip_client.c
r7d6fe4db r849ed54 37 37 38 38 #include <errno.h> 39 40 39 #include <sys/types.h> 41 40 42 #include "../../include/ip_client.h" 43 #include "../../include/socket_errno.h" 44 45 #include "../../structures/packet/packet.h" 46 #include "../../structures/packet/packet_client.h" 47 48 #include "ip_header.h" 41 #include <ip_client.h> 42 #include <socket_errno.h> 43 #include <packet/packet.h> 44 #include <packet/packet_client.h> 45 #include <ip_header.h> 49 46 50 47 size_t ip_client_header_length(packet_t packet){ -
uspace/lib/net/il/ip_remote.c
r7d6fe4db r849ed54 39 39 #include <ipc/services.h> 40 40 41 #include "../../messages.h" 42 #include "../../modules.h" 43 44 #include "../../include/device.h" 45 #include "../../include/inet.h" 46 #include "../../include/ip_interface.h" 47 48 #include "../../structures/packet/packet_client.h" 49 50 #include "../il_messages.h" 51 52 #include "ip_messages.h" 41 #include <net_messages.h> 42 #include <net_modules.h> 43 #include <net_device.h> 44 #include <inet.h> 45 #include <ip_interface.h> 46 #include <packet/packet_client.h> 47 #include <il_messages.h> 48 #include <ip_messages.h> 53 49 54 50 int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway){ -
uspace/lib/net/include/adt/module_map.h
r7d6fe4db r849ed54 42 42 #include <ipc/services.h> 43 43 44 #include "../modules.h"44 #include <net_modules.h> 45 45 46 #include "generic_char_map.h"46 #include <adt/generic_char_map.h> 47 47 48 48 /** Type definition of the module structure. -
uspace/lib/net/include/arp_interface.h
r7d6fe4db r849ed54 41 41 #define __NET_ARP_INTERFACE_H__ 42 42 43 #include "../structures/measured_strings.h" 44 45 #include "device.h" 43 #include <adt/measured_strings.h> 44 #include <net_device.h> 46 45 47 46 /** @name ARP module interface … … 67 66 * @returns Other error codes as defined for the nil_get_broadcast_addr() function. 68 67 */ 69 int arp_device_req(int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address);68 extern int arp_device_req(int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address); 70 69 71 70 /** Translates the given protocol address to the network interface address. … … 83 82 * @returns ENOENT if the mapping is not found. 84 83 */ 85 int arp_translate_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data);84 extern int arp_translate_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data); 86 85 87 86 /** Clears the device cache. … … 91 90 * @returns ENOENT if the device is not found. 92 91 */ 93 int arp_clear_device_req(int arp_phone, device_id_t device_id);92 extern int arp_clear_device_req(int arp_phone, device_id_t device_id); 94 93 95 94 /** Clears the given protocol address from the cache. … … 101 100 * @returns ENOENT if the mapping is not found. 102 101 */ 103 int arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address);102 extern int arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address); 104 103 105 104 /** Cleans the cache. … … 107 106 * @returns EOK on success. 108 107 */ 109 int arp_clean_cache_req(int arp_phone);108 extern int arp_clean_cache_req(int arp_phone); 110 109 111 110 /** Connects to the ARP module. … … 114 113 * @returns 0 if called by the bundle module. 115 114 */ 116 int arp_connect_module(services_t service);115 extern int arp_connect_module(services_t service); 117 116 118 117 /** Returns the ARP task identifier. … … 120 119 * @returns 0 if called by the remote module. 121 120 */ 122 task_id_t arp_task_get_id(void);121 extern task_id_t arp_task_get_id(void); 123 122 124 123 /*@}*/ -
uspace/lib/net/include/arp_messages.h
r7d6fe4db r849ed54 41 41 #include <ipc/ipc.h> 42 42 43 #include "../../messages.h"43 #include <net_messages.h> 44 44 45 45 /** ARP module messages. -
uspace/lib/net/include/icmp_client.h
r7d6fe4db r849ed54 38 38 #define __NET_ICMP_CLIENT_H__ 39 39 40 #include "icmp_codes.h"41 #include "../structures/packet/packet.h"40 #include <icmp_codes.h> 41 #include <packet/packet.h> 42 42 43 43 /** Processes the received packet prefixed with an ICMP header. … … 50 50 * @returns Zero (0) if the packet contains no data. 51 51 */ 52 int icmp_client_process_packet(packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu);52 extern int icmp_client_process_packet(packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu); 53 53 54 54 /** Returns the ICMP header length. … … 56 56 * @returns The ICMP header length in bytes. 57 57 */ 58 size_t icmp_client_header_length(packet_t packet);58 extern size_t icmp_client_header_length(packet_t packet); 59 59 60 60 #endif -
uspace/lib/net/include/icmp_header.h
r7d6fe4db r849ed54 41 41 #include <sys/types.h> 42 42 43 #include "../../include/in.h"44 #include "../../include/icmp_codes.h"43 #include <in.h> 44 #include <icmp_codes.h> 45 45 46 46 /** ICMP header size in bytes. -
uspace/lib/net/include/icmp_interface.h
r7d6fe4db r849ed54 43 43 #include <sys/types.h> 44 44 45 #include "device.h" 46 47 #include "../structures/measured_strings.h" 48 #include "../structures/packet/packet.h" 49 50 #include "inet.h" 51 #include "ip_codes.h" 52 #include "socket_codes.h" 53 54 #include "icmp_codes.h" 55 #include "icmp_common.h" 45 #include <net_device.h> 46 #include <adt/measured_strings.h> 47 #include <packet/packet.h> 48 #include <inet.h> 49 #include <ip_codes.h> 50 #include <socket_codes.h> 51 #include <icmp_codes.h> 52 #include <icmp_common.h> 56 53 57 54 /** @name ICMP module interface … … 71 68 * @returns ENOMEM if there is not enough memory left. 72 69 */ 73 int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet);70 extern int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet); 74 71 75 72 /** Sends the Source Quench error notification packet. … … 82 79 * @returns ENOMEM if there is not enough memory left. 83 80 */ 84 int icmp_source_quench_msg(int icmp_phone, packet_t packet);81 extern int icmp_source_quench_msg(int icmp_phone, packet_t packet); 85 82 86 83 /** Sends the Time Exceeded error notification packet. … … 94 91 * @returns ENOMEM if there is not enough memory left. 95 92 */ 96 int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet);93 extern int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t packet); 97 94 98 95 /** Sends the Parameter Problem error notification packet. … … 107 104 * @returns ENOMEM if there is not enough memory left. 108 105 */ 109 int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet);106 extern int icmp_parameter_problem_msg(int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet); 110 107 111 108 /*@}*/ -
uspace/lib/net/include/il_interface.h
r7d6fe4db r849ed54 43 43 #include <ipc/services.h> 44 44 45 #include "../messages.h" 46 47 #include "../include/device.h" 48 49 #include "../structures/packet/packet.h" 50 #include "../structures/packet/packet_client.h" 51 52 #include "../il/il_messages.h" 45 #include <net_messages.h> 46 #include <net_device.h> 47 #include <packet/packet.h> 48 #include <packet/packet_client.h> 49 #include <il_messages.h> 53 50 54 51 /** @name Internetwork layer module interface -
uspace/lib/net/include/ip_client.h
r7d6fe4db r849ed54 40 40 #include <sys/types.h> 41 41 42 #include "../structures/packet/packet.h" 43 44 #include "ip_codes.h" 45 #include "ip_interface.h" 46 #include "socket_codes.h" 42 #include <packet/packet.h> 43 #include <ip_codes.h> 44 #include <ip_interface.h> 45 #include <socket_codes.h> 47 46 48 47 /** Prepares the packet to be transfered via IP. … … 57 56 * @returns ENOMEM if there is not enough memory left in the packet. 58 57 */ 59 int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length);58 extern int ip_client_prepare_packet(packet_t packet, ip_protocol_t protocol, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, size_t ipopt_length); 60 59 61 60 /** Processes the received IP packet. … … 71 70 * @returns ENOMEM if the packet is too short to contain the IP header. 72 71 */ 73 int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length);72 extern int ip_client_process_packet(packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length); 74 73 75 74 /** Returns the IP header length. … … 78 77 * @returns Zero (0) if there is no IP header. 79 78 */ 80 size_t ip_client_header_length(packet_t packet);79 extern size_t ip_client_header_length(packet_t packet); 81 80 82 81 /** Updates the IPv4 pseudo header data length field. … … 88 87 * @returns EINVAL if the headerlen parameter is not IPv4 pseudo header length. 89 88 */ 90 int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length);89 extern int ip_client_set_pseudo_header_data_length(ip_pseudo_header_ref header, size_t headerlen, size_t data_length); 91 90 92 91 /** Constructs the IPv4 pseudo header. … … 108 107 * @returns ENOMEM if there is not enough memory left. 109 108 */ 110 int ip_client_get_pseudo_header(ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen);109 extern int ip_client_get_pseudo_header(ip_protocol_t protocol, struct sockaddr * src, socklen_t srclen, struct sockaddr * dest, socklen_t destlen, size_t data_length, ip_pseudo_header_ref * header, size_t * headerlen); 111 110 112 111 // TODO ipopt manipulation -
uspace/lib/net/include/ip_interface.h
r7d6fe4db r849ed54 42 42 43 43 #include <async.h> 44 45 44 #include <ipc/services.h> 46 45 47 #include "../include/device.h" 46 #include <net_device.h> 47 #include <packet/packet.h> 48 48 49 #include "../structures/packet/packet.h" 50 51 #include "in.h" 52 #include "ip_codes.h" 53 #include "socket_codes.h" 49 #include <in.h> 50 #include <ip_codes.h> 51 #include <socket_codes.h> 54 52 55 53 /** @name IP module interface … … 82 80 * @returns Other error codes as defined for the bind_service() function. 83 81 */ 84 int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg);82 extern int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg); 85 83 86 84 /** Registers the new device. … … 98 96 * @returns Other error codes as defined for the arp_device_req() function. 99 97 */ 100 int ip_device_req(int ip_phone, device_id_t device_id, services_t netif);98 extern int ip_device_req(int ip_phone, device_id_t device_id, services_t netif); 101 99 102 100 /** Sends the packet queue. … … 110 108 * @returns Other error codes as defined for the generic_send_msg() function. 111 109 */ 112 int ip_send_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error);110 extern int ip_send_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t sender, services_t error); 113 111 114 112 /** Connects to the IP module. … … 117 115 * @returns 0 if called by the bundle module. 118 116 */ 119 int ip_connect_module(services_t service);117 extern int ip_connect_module(services_t service); 120 118 121 119 /** Adds a route to the device routing table. … … 127 125 * @param[in] gateway The target network gateway. Not used if zero. 128 126 */ 129 int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway);127 extern int ip_add_route_req(int ip_phone, device_id_t device_id, in_addr_t address, in_addr_t netmask, in_addr_t gateway); 130 128 131 129 /** Sets the default gateway. … … 135 133 * @param[in] gateway The default gateway. 136 134 */ 137 int ip_set_gateway_req(int ip_phone, device_id_t device_id, in_addr_t gateway);135 extern int ip_set_gateway_req(int ip_phone, device_id_t device_id, in_addr_t gateway); 138 136 139 137 /** Returns the device packet dimension for sending. … … 145 143 * @returns Other error codes as defined for the generic_packet_size_req() function. 146 144 */ 147 int ip_packet_size_req(int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension);145 extern int ip_packet_size_req(int ip_phone, device_id_t device_id, packet_dimension_ref packet_dimension); 148 146 149 147 /** Notifies the IP module about the received error notification packet. … … 155 153 * @returns EOK on success. 156 154 */ 157 int ip_received_error_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error);155 extern int ip_received_error_msg(int ip_phone, device_id_t device_id, packet_t packet, services_t target, services_t error); 158 156 159 157 /** Returns the device identifier and the IP pseudo header based on the destination address. … … 166 164 * @param[out] headerlen The IP pseudo header length. 167 165 */ 168 int ip_get_route_req(int ip_phone, ip_protocol_t protocol, const struct sockaddr * destination, socklen_t addrlen, device_id_t * device_id, ip_pseudo_header_ref * header, size_t * headerlen);166 extern int ip_get_route_req(int ip_phone, ip_protocol_t protocol, const struct sockaddr * destination, socklen_t addrlen, device_id_t * device_id, ip_pseudo_header_ref * header, size_t * headerlen); 169 167 170 168 /*@}*/ -
uspace/lib/net/include/ip_messages.h
r7d6fe4db r849ed54 41 41 #include <ipc/ipc.h> 42 42 43 #include "../../include/in.h"44 #include "../../include/ip_codes.h"43 #include <in.h> 44 #include <ip_codes.h> 45 45 46 46 /** IP module messages. -
uspace/lib/net/include/net_checksum.h
r7d6fe4db r849ed54 65 65 * @returns The computed CRC32 of the length bits of the data. 66 66 */ 67 uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length);67 extern uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length); 68 68 69 69 /** Computes CRC32 value in the big-endian environment. … … 73 73 * @returns The computed CRC32 of the length bits of the data. 74 74 */ 75 uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length);75 extern uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length); 76 76 77 77 /** Computes sum of the 2 byte fields. … … 82 82 * @returns The computed checksum of the length bytes of the data. 83 83 */ 84 uint32_t compute_checksum(uint32_t seed, uint8_t * data, size_t length);84 extern uint32_t compute_checksum(uint32_t seed, uint8_t * data, size_t length); 85 85 86 86 /** Compacts the computed checksum to the 16 bit number adding the carries. … … 88 88 * @returns Compacted computed checksum to the 16 bits. 89 89 */ 90 uint16_t compact_checksum(uint32_t sum);90 extern uint16_t compact_checksum(uint32_t sum); 91 91 92 92 /** Returns or flips the checksum if zero. … … 95 95 * @returns 0xFFFF if the computed checksum is zero. 96 96 */ 97 uint16_t flip_checksum(uint16_t checksum);97 extern uint16_t flip_checksum(uint16_t checksum); 98 98 99 99 /** Computes the ip header checksum. … … 106 106 * @returns 0xFFFF if the computed checksum is zero. 107 107 */ 108 uint16_t ip_checksum(uint8_t * data, size_t length);108 extern uint16_t ip_checksum(uint8_t * data, size_t length); 109 109 110 110 #endif -
uspace/lib/net/include/net_interface.h
r7d6fe4db r849ed54 43 43 #include <ipc/services.h> 44 44 45 #include "../include/device.h" 46 47 #include "../structures/measured_strings.h" 45 #include <net_device.h> 46 #include <adt/measured_strings.h> 48 47 49 48 /** @name Networking module interface … … 66 65 * @returns Other error codes as defined for the generic_translate_req() function. 67 66 */ 68 int net_get_device_conf_req(int net_phone, device_id_t device_id, measured_string_ref * configuration, size_t count, char ** data);67 extern int net_get_device_conf_req(int net_phone, device_id_t device_id, measured_string_ref * configuration, size_t count, char ** data); 69 68 70 69 /** Returns the global configuration. … … 80 79 * @returns Other error codes as defined for the generic_translate_req() function. 81 80 */ 82 int net_get_conf_req(int net_phone, measured_string_ref * configuration, size_t count, char ** data);81 extern int net_get_conf_req(int net_phone, measured_string_ref * configuration, size_t count, char ** data); 83 82 84 83 /** Frees the received settings. … … 88 87 * @see net_get_conf_req() 89 88 */ 90 void net_free_settings(measured_string_ref settings, char * data);89 extern void net_free_settings(measured_string_ref settings, char * data); 91 90 92 91 /** Connects to the networking module. … … 95 94 * @returns 0 if called by the bundle module. 96 95 */ 97 int net_connect_module(services_t service);96 extern int net_connect_module(services_t service); 98 97 99 98 /*@}*/ -
uspace/lib/net/include/net_net_messages.h
r7d6fe4db r849ed54 41 41 #include <ipc/ipc.h> 42 42 43 #include "../messages.h"43 #include <net_messages.h> 44 44 45 45 /** Networking subsystem central module messages. -
uspace/lib/net/include/netif.h
r7d6fe4db r849ed54 45 45 #include <ipc/ipc.h> 46 46 47 #include "../err.h" 48 49 #include "../include/device.h" 50 51 #include "../structures/packet/packet.h" 47 #include <net_err.h> 48 #include <net_device.h> 49 #include <packet/packet.h> 52 50 53 51 /** Network interface module skeleton global data. … … 102 100 }; 103 101 102 extern netif_globals_t netif_globals; 103 104 104 /** Finds the device specific data. 105 105 * @param[in] device_id The device identifier. … … 109 109 * @returns EPERM if the device is not initialized. 110 110 */ 111 int find_device(device_id_t device_id, device_ref * device);111 extern int find_device(device_id_t device_id, device_ref * device); 112 112 113 113 /** Clears the usage statistics. 114 114 * @param[in] stats The usage statistics. 115 115 */ 116 void null_device_stats(device_stats_ref stats);116 extern void null_device_stats(device_stats_ref stats); 117 117 118 118 // prepared for future optimalizations … … 120 120 * @param[in] packet_id The packet identifier. 121 121 */ 122 void netif_pq_release(packet_id_t packet_id);122 extern void netif_pq_release(packet_id_t packet_id); 123 123 124 124 /** Allocates new packet to handle the given content size. … … 127 127 * @returns NULL if there is an error. 128 128 */ 129 packet_t netif_packet_get_1(size_t content);129 extern packet_t netif_packet_get_1(size_t content); 130 130 131 131 /** Processes the netif module messages. … … 140 140 * @see IS_NET_NETIF_MESSAGE() 141 141 */ 142 int netif_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);142 extern int netif_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 143 143 144 144 /** Initializes the netif module. 145 145 * The function has to be defined in each module. 146 * @param[in] client_connection The client connection functio to be registered.146 * @param[in] net_client_connection The client connection functio to be registered. 147 147 * @returns EOK on success. 148 148 * @returns Other error codes as defined for each specific module message function. 149 149 */ 150 int netif_init_module(async_client_conn_t client_connection);150 extern int netif_init_module(async_client_conn_t client_connection); 151 151 152 152 /** Starts and maintains the netif module until terminated. 153 153 * @returns EOK after the module is terminated. 154 154 */ 155 int netif_run_module(void);155 extern int netif_run_module(void); 156 156 157 157 #endif -
uspace/lib/net/include/netif_interface.h
r7d6fe4db r849ed54 43 43 #include <ipc/services.h> 44 44 45 #include "../messages.h" 46 47 #include "../structures/measured_strings.h" 48 #include "../structures/packet/packet.h" 49 50 #include "device.h" 45 #include <net_messages.h> 46 #include <adt/measured_strings.h> 47 #include <packet/packet.h> 48 #include <net_device.h> 51 49 52 50 /** @name Network interface module interface … … 65 63 * @returns Other error codes as defined for the netif_get_addr_message() function. 66 64 */ 67 int netif_get_addr_req(int netif_phone, device_id_t device_id, measured_string_ref * address, char ** data);65 extern int netif_get_addr_req(int netif_phone, device_id_t device_id, measured_string_ref * address, char ** data); 68 66 69 67 /** Probes the existence of the device. … … 75 73 * @returns Other errro codes as defined for the netif_probe_message(). 76 74 */ 77 int netif_probe_req(int netif_phone, device_id_t device_id, int irq, int io);75 extern int netif_probe_req(int netif_phone, device_id_t device_id, int irq, int io); 78 76 79 77 /** Sends the packet queue. … … 85 83 * @returns Other error codes as defined for the generic_send_msg() function. 86 84 */ 87 int netif_send_msg(int netif_phone, device_id_t device_id, packet_t packet, services_t sender);85 extern int netif_send_msg(int netif_phone, device_id_t device_id, packet_t packet, services_t sender); 88 86 89 87 /** Starts the device. … … 94 92 * @returns Other error codes as defined for the netif_start_message() function. 95 93 */ 96 int netif_start_req(int netif_phone, device_id_t device_id);94 extern int netif_start_req(int netif_phone, device_id_t device_id); 97 95 98 96 /** Stops the device. … … 103 101 * @returns Other error codes as defined for the netif_stop_message() function. 104 102 */ 105 int netif_stop_req(int netif_phone, device_id_t device_id);103 extern int netif_stop_req(int netif_phone, device_id_t device_id); 106 104 107 105 /** Returns the device usage statistics. … … 111 109 * @returns EOK on success. 112 110 */ 113 int netif_stats_req(int netif_phone, device_id_t device_id, device_stats_ref stats);111 extern int netif_stats_req(int netif_phone, device_id_t device_id, device_stats_ref stats); 114 112 115 113 /** Creates bidirectional connection with the network interface module and registers the message receiver. … … 122 120 * @returns Other error codes as defined for the bind_service() function. 123 121 */ 124 int netif_bind_service(services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver);122 extern int netif_bind_service(services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver); 125 123 126 124 /*@}*/ -
uspace/lib/net/include/netif_messages.h
r7d6fe4db r849ed54 41 41 #include <ipc/ipc.h> 42 42 43 #include "../messages.h"43 #include <net_messages.h> 44 44 45 45 /** Network interface common module messages. -
uspace/lib/net/include/netif_module.h
r7d6fe4db r849ed54 43 43 #include <ipc/services.h> 44 44 45 #include "../structures/measured_strings.h" 46 #include "../structures/packet/packet.h" 47 48 #include "../include/device.h" 45 #include <adt/measured_strings.h> 46 #include <packet/packet.h> 47 #include <net_device.h> 49 48 50 49 /** Initializes the specific module. 51 50 */ 52 int netif_initialize(void);51 extern int netif_initialize(void); 53 52 54 53 /** Probes the existence of the device. … … 60 59 * @returns Other error codes as defined for the specific module message implementation. 61 60 */ 62 int netif_probe_message(device_id_t device_id, int irq, uintptr_t io);61 extern int netif_probe_message(device_id_t device_id, int irq, uintptr_t io); 63 62 64 63 /** Sends the packet queue. … … 71 70 * @returns Other error codes as defined for the specific module message implementation. 72 71 */ 73 int netif_send_message(device_id_t device_id, packet_t packet, services_t sender);72 extern int netif_send_message(device_id_t device_id, packet_t packet, services_t sender); 74 73 75 74 /** Starts the device. … … 79 78 * @returns Other error codes as defined for the specific module message implementation. 80 79 */ 81 int netif_start_message(device_ref device);80 extern int netif_start_message(device_ref device); 82 81 83 82 /** Stops the device. … … 87 86 * @returns Other error codes as defined for the specific module message implementation. 88 87 */ 89 int netif_stop_message(device_ref device);88 extern int netif_stop_message(device_ref device); 90 89 91 90 /** Returns the device local hardware address. … … 98 97 * @returns Other error codes as defined for the specific module message implementation. 99 98 */ 100 int netif_get_addr_message(device_id_t device_id, measured_string_ref address);99 extern int netif_get_addr_message(device_id_t device_id, measured_string_ref address); 101 100 102 101 /** Processes the netif driver specific message. … … 110 109 * @returns Other error codes as defined for the specific module message implementation. 111 110 */ 112 int netif_specific_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);111 extern int netif_specific_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 113 112 114 113 /** Returns the device usage statistics. … … 119 118 * @returns Other error codes as defined for the specific module message implementation. 120 119 */ 121 int netif_get_device_stats(device_id_t device_id, device_stats_ref stats);120 extern int netif_get_device_stats(device_id_t device_id, device_stats_ref stats); 122 121 123 122 #endif -
uspace/lib/net/include/nil_interface.h
r7d6fe4db r849ed54 47 47 #include <ipc/ipc.h> 48 48 49 #include "../messages.h" 50 51 #include "../structures/measured_strings.h" 52 #include "../structures/packet/packet.h" 53 54 #include "../nil/nil_messages.h" 55 56 #include "device.h" 49 #include <net_messages.h> 50 #include <adt/measured_strings.h> 51 #include <packet/packet.h> 52 #include <nil_messages.h> 53 #include <net_device.h> 57 54 58 55 /** @name Network interface layer module interface … … 129 126 * @returns Other error codes as defined for each specific module device state function. 130 127 */ 131 int nil_device_state_msg(int nil_phone, device_id_t device_id, int state);128 extern int nil_device_state_msg(int nil_phone, device_id_t device_id, int state); 132 129 133 130 /** Passes the packet queue to the network interface layer. … … 140 137 * @returns Other error codes as defined for each specific module received function. 141 138 */ 142 int nil_received_msg(int nil_phone, device_id_t device_id, packet_t packet, services_t target);139 extern int nil_received_msg(int nil_phone, device_id_t device_id, packet_t packet, services_t target); 143 140 144 141 /** Creates bidirectional connection with the network interface layer module and registers the message receiver. -
uspace/lib/net/include/nil_messages.h
r7d6fe4db r849ed54 41 41 #include <ipc/ipc.h> 42 42 43 #include "../messages.h"43 #include <net_messages.h> 44 44 45 45 /** Network interface layer module messages. -
uspace/lib/net/include/nil_module.h
r7d6fe4db r849ed54 36 36 */ 37 37 38 #ifndef __NET_ ETH_MODULE_H__39 #define __NET_ ETH_MODULE_H__38 #ifndef __NET_NIL_MODULE_H__ 39 #define __NET_NIL_MODULE_H__ 40 40 41 41 #include <ipc/ipc.h> … … 47 47 * @returns Other error codes as defined for each specific module initialize function. 48 48 */ 49 int nil_initialize(int net_phone);49 extern int nil_initialize(int net_phone); 50 50 51 51 /** Message processing function. … … 60 60 * @see IS_NET_NIL_MESSAGE() 61 61 */ 62 int nil_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);62 extern int nil_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 63 63 64 64 #endif -
uspace/lib/net/include/protocol_map.h
r7d6fe4db r849ed54 40 40 #include <ipc/services.h> 41 41 42 #include "ethernet_lsap.h"43 #include "ethernet_protocols.h"44 #include "hardware.h"42 #include <ethernet_lsap.h> 43 #include <ethernet_protocols.h> 44 #include <net_hardware.h> 45 45 46 46 /** Maps the internetwork layer service to the network interface layer type. -
uspace/lib/net/include/tl_common.h
r7d6fe4db r849ed54 38 38 #define __NET_TL_COMMON_H__ 39 39 40 #include "../structures/packet/packet.h" 41 42 #include "../include/device.h" 43 #include "../include/inet.h" 44 #include "../include/socket_codes.h" 40 #include <packet/packet.h> 41 #include <net_device.h> 42 #include <inet.h> 43 #include <socket_codes.h> 45 44 46 45 /** Device packet dimensions. … … 59 58 * @returns EAFNOSUPPORT if the address family is not supported. 60 59 */ 61 int tl_get_address_port(const struct sockaddr * addr, int addrlen, uint16_t * port);60 extern int tl_get_address_port(const struct sockaddr * addr, int addrlen, uint16_t * port); 62 61 63 62 /** Gets IP packet dimensions. … … 74 73 * @returns Other codes as defined for the ip_packet_size_req() function. 75 74 */ 76 int tl_get_ip_packet_dimension(int ip_phone, packet_dimensions_ref packet_dimensions, device_id_t device_id, packet_dimension_ref * packet_dimension);75 extern int tl_get_ip_packet_dimension(int ip_phone, packet_dimensions_ref packet_dimensions, device_id_t device_id, packet_dimension_ref * packet_dimension); 77 76 78 77 /** Updates IP device packet dimensions cache. … … 83 82 * @returns ENOENT if the packet dimension is not cached. 84 83 */ 85 int tl_update_ip_packet_dimension(packet_dimensions_ref packet_dimensions, device_id_t device_id, size_t content);84 extern int tl_update_ip_packet_dimension(packet_dimensions_ref packet_dimensions, device_id_t device_id, size_t content); 86 85 87 86 /** Sets the address port. … … 94 93 * @returns EAFNOSUPPORT if the address family is not supported. 95 94 */ 96 int tl_set_address_port(struct sockaddr * addr, int addrlen, uint16_t port);95 extern int tl_set_address_port(struct sockaddr * addr, int addrlen, uint16_t port); 97 96 98 97 /** Prepares the packet for ICMP error notification. … … 106 105 * @returns ENOENT if no packet may be sent. 107 106 */ 108 int tl_prepare_icmp_packet(int packet_phone, int icmp_phone, packet_t packet, services_t error);107 extern int tl_prepare_icmp_packet(int packet_phone, int icmp_phone, packet_t packet, services_t error); 109 108 110 109 /** Receives data from the socket into a packet. … … 120 119 * @returns Other error codes as defined for the async_data_read_finalize() function. 121 120 */ 122 int tl_socket_read_packet_data(int packet_phone, packet_ref packet, size_t prefix, const packet_dimension_ref dimension, const struct sockaddr * addr, socklen_t addrlen);121 extern int tl_socket_read_packet_data(int packet_phone, packet_ref packet, size_t prefix, const packet_dimension_ref dimension, const struct sockaddr * addr, socklen_t addrlen); 123 122 124 123 #endif -
uspace/lib/net/include/tl_interface.h
r7d6fe4db r849ed54 39 39 40 40 #include <async.h> 41 42 41 #include <ipc/services.h> 43 42 44 #include "../messages.h" 45 46 #include "../include/device.h" 47 48 #include "../structures/packet/packet.h" 49 #include "../structures/packet/packet_client.h" 50 51 #include "../tl/tl_messages.h" 43 #include <net_messages.h> 44 #include <net_device.h> 45 #include <packet/packet.h> 46 #include <packet/packet_client.h> 47 #include <tl_messages.h> 52 48 53 49 /** @name Transport layer module interface -
uspace/lib/net/include/tl_messages.h
r7d6fe4db r849ed54 41 41 #include <ipc/ipc.h> 42 42 43 #include "../messages.h"43 #include <net_messages.h> 44 44 45 45 /** Transport layer modules messages. -
uspace/lib/net/netif/netif.c
r7d6fe4db r849ed54 44 44 #include <ipc/services.h> 45 45 46 #include "../err.h" 47 #include "../messages.h" 48 #include "../modules.h" 49 50 #include "../structures/packet/packet.h" 51 #include "../structures/packet/packet_client.h" 52 #include "../structures/measured_strings.h" 53 54 #include "../include/device.h" 55 #include "../include/netif_interface.h" 56 #include "../include/nil_interface.h" 57 58 #include "netif.h" 59 #include "netif_messages.h" 60 #include "netif_module.h" 61 62 /** Network interface module global data. 63 */ 64 extern netif_globals_t netif_globals; 46 #include <net_err.h> 47 #include <net_messages.h> 48 #include <net_modules.h> 49 #include <packet/packet.h> 50 #include <packet/packet_client.h> 51 #include <adt/measured_strings.h> 52 #include <net_device.h> 53 #include <netif_interface.h> 54 #include <nil_interface.h> 55 #include <netif.h> 56 #include <netif_messages.h> 57 #include <netif_module.h> 65 58 66 59 DEVICE_MAP_IMPLEMENT(device_map, device_t) 67 60 68 /** @name Message processing functions 69 */ 70 /*@{*/ 61 /** Network interface global data. 62 */ 63 netif_globals_t netif_globals; 64 65 int netif_probe_req(int netif_phone, device_id_t device_id, int irq, int io){ 66 int result; 67 68 fibril_rwlock_write_lock(&netif_globals.lock); 69 result = netif_probe_message(device_id, irq, io); 70 fibril_rwlock_write_unlock(&netif_globals.lock); 71 return result; 72 } 73 74 int netif_send_msg(int netif_phone, device_id_t device_id, packet_t packet, services_t sender){ 75 int result; 76 77 fibril_rwlock_write_lock(&netif_globals.lock); 78 result = netif_send_message(device_id, packet, sender); 79 fibril_rwlock_write_unlock(&netif_globals.lock); 80 return result; 81 } 82 83 int netif_start_req(int netif_phone, device_id_t device_id){ 84 ERROR_DECLARE; 85 86 device_ref device; 87 int result; 88 int phone; 89 90 fibril_rwlock_write_lock(&netif_globals.lock); 91 if(ERROR_OCCURRED(find_device(device_id, &device))){ 92 fibril_rwlock_write_unlock(&netif_globals.lock); 93 return ERROR_CODE; 94 } 95 result = netif_start_message(device); 96 if(result > NETIF_NULL){ 97 phone = device->nil_phone; 98 fibril_rwlock_write_unlock(&netif_globals.lock); 99 nil_device_state_msg(phone, device_id, result); 100 return EOK; 101 }else{ 102 fibril_rwlock_write_unlock(&netif_globals.lock); 103 } 104 return result; 105 } 106 107 int netif_stop_req(int netif_phone, device_id_t device_id){ 108 ERROR_DECLARE; 109 110 device_ref device; 111 int result; 112 int phone; 113 114 fibril_rwlock_write_lock(&netif_globals.lock); 115 if(ERROR_OCCURRED(find_device(device_id, &device))){ 116 fibril_rwlock_write_unlock(&netif_globals.lock); 117 return ERROR_CODE; 118 } 119 result = netif_stop_message(device); 120 if(result > NETIF_NULL){ 121 phone = device->nil_phone; 122 fibril_rwlock_write_unlock(&netif_globals.lock); 123 nil_device_state_msg(phone, device_id, result); 124 return EOK; 125 }else{ 126 fibril_rwlock_write_unlock(&netif_globals.lock); 127 } 128 return result; 129 } 130 131 int netif_stats_req(int netif_phone, device_id_t device_id, device_stats_ref stats){ 132 int res; 133 134 fibril_rwlock_read_lock(&netif_globals.lock); 135 res = netif_get_device_stats(device_id, stats); 136 fibril_rwlock_read_unlock(&netif_globals.lock); 137 return res; 138 } 139 140 int netif_get_addr_req(int netif_phone, device_id_t device_id, measured_string_ref * address, char ** data){ 141 ERROR_DECLARE; 142 143 measured_string_t translation; 144 145 if(!(address && data)){ 146 return EBADMEM; 147 } 148 fibril_rwlock_read_lock(&netif_globals.lock); 149 if(! ERROR_OCCURRED(netif_get_addr_message(device_id, &translation))){ 150 *address = measured_string_copy(&translation); 151 ERROR_CODE = (*address) ? EOK : ENOMEM; 152 } 153 fibril_rwlock_read_unlock(&netif_globals.lock); 154 *data = (** address).value; 155 return ERROR_CODE; 156 } 157 158 int netif_bind_service(services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver){ 159 return EOK; 160 } 161 162 int find_device(device_id_t device_id, device_ref * device){ 163 if(! device){ 164 return EBADMEM; 165 } 166 *device = device_map_find(&netif_globals.device_map, device_id); 167 if(! * device){ 168 return ENOENT; 169 } 170 if((** device).state == NETIF_NULL) return EPERM; 171 return EOK; 172 } 173 174 void null_device_stats(device_stats_ref stats){ 175 bzero(stats, sizeof(device_stats_t)); 176 } 71 177 72 178 /** Registers the device notification receiver, the network interface layer module. … … 77 183 * @returns ELIMIT if there is another module registered. 78 184 */ 79 int register_message(device_id_t device_id, int phone); 80 81 /*@}*/ 82 83 int netif_probe_req(int netif_phone, device_id_t device_id, int irq, int io){ 84 int result; 85 86 fibril_rwlock_write_lock(&netif_globals.lock); 87 result = netif_probe_message(device_id, irq, io); 88 fibril_rwlock_write_unlock(&netif_globals.lock); 89 return result; 90 } 91 92 int netif_send_msg(int netif_phone, device_id_t device_id, packet_t packet, services_t sender){ 93 int result; 94 95 fibril_rwlock_write_lock(&netif_globals.lock); 96 result = netif_send_message(device_id, packet, sender); 97 fibril_rwlock_write_unlock(&netif_globals.lock); 98 return result; 99 } 100 101 int netif_start_req(int netif_phone, device_id_t device_id){ 102 ERROR_DECLARE; 103 104 device_ref device; 105 int result; 106 int phone; 107 108 fibril_rwlock_write_lock(&netif_globals.lock); 109 if(ERROR_OCCURRED(find_device(device_id, &device))){ 110 fibril_rwlock_write_unlock(&netif_globals.lock); 111 return ERROR_CODE; 112 } 113 result = netif_start_message(device); 114 if(result > NETIF_NULL){ 115 phone = device->nil_phone; 116 fibril_rwlock_write_unlock(&netif_globals.lock); 117 nil_device_state_msg(phone, device_id, result); 118 return EOK; 119 }else{ 120 fibril_rwlock_write_unlock(&netif_globals.lock); 121 } 122 return result; 123 } 124 125 int netif_stop_req(int netif_phone, device_id_t device_id){ 126 ERROR_DECLARE; 127 128 device_ref device; 129 int result; 130 int phone; 131 132 fibril_rwlock_write_lock(&netif_globals.lock); 133 if(ERROR_OCCURRED(find_device(device_id, &device))){ 134 fibril_rwlock_write_unlock(&netif_globals.lock); 135 return ERROR_CODE; 136 } 137 result = netif_stop_message(device); 138 if(result > NETIF_NULL){ 139 phone = device->nil_phone; 140 fibril_rwlock_write_unlock(&netif_globals.lock); 141 nil_device_state_msg(phone, device_id, result); 142 return EOK; 143 }else{ 144 fibril_rwlock_write_unlock(&netif_globals.lock); 145 } 146 return result; 147 } 148 149 int netif_stats_req(int netif_phone, device_id_t device_id, device_stats_ref stats){ 150 int res; 151 152 fibril_rwlock_read_lock(&netif_globals.lock); 153 res = netif_get_device_stats(device_id, stats); 154 fibril_rwlock_read_unlock(&netif_globals.lock); 155 return res; 156 } 157 158 int netif_get_addr_req(int netif_phone, device_id_t device_id, measured_string_ref * address, char ** data){ 159 ERROR_DECLARE; 160 161 measured_string_t translation; 162 163 if(!(address && data)){ 164 return EBADMEM; 165 } 166 fibril_rwlock_read_lock(&netif_globals.lock); 167 if(! ERROR_OCCURRED(netif_get_addr_message(device_id, &translation))){ 168 *address = measured_string_copy(&translation); 169 ERROR_CODE = (*address) ? EOK : ENOMEM; 170 } 171 fibril_rwlock_read_unlock(&netif_globals.lock); 172 *data = (** address).value; 173 return ERROR_CODE; 174 } 175 176 int netif_bind_service(services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver){ 177 return EOK; 178 } 179 180 int find_device(device_id_t device_id, device_ref * device){ 181 if(! device){ 182 return EBADMEM; 183 } 184 *device = device_map_find(&netif_globals.device_map, device_id); 185 if(! * device){ 186 return ENOENT; 187 } 188 if((** device).state == NETIF_NULL) return EPERM; 189 return EOK; 190 } 191 192 void null_device_stats(device_stats_ref stats){ 193 bzero(stats, sizeof(device_stats_t)); 194 } 195 196 int register_message(device_id_t device_id, int phone){ 185 static int register_message(device_id_t device_id, int phone){ 197 186 ERROR_DECLARE; 198 187 -
uspace/lib/net/netif/netif_nil_bundle.c
r7d6fe4db r849ed54 37 37 38 38 #include <async.h> 39 40 39 #include <ipc/ipc.h> 41 40 42 #include "../messages.h" 43 44 #include "../structures/packet/packet.h" 45 46 #include "../nil/nil_module.h" 47 48 #include "netif.h" 49 50 /** Network interface module global data. 51 */ 52 extern netif_globals_t netif_globals; 41 #include <net_messages.h> 42 #include <packet/packet.h> 43 #include <nil_module.h> 44 #include <netif_nil_bundle.h> 45 #include <netif.h> 53 46 54 47 /** Distributes the messages between the module parts. … … 61 54 * @returns Other error codes as defined for each specific module message function. 62 55 */ 63 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 56 int netif_nil_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 57 if(IS_NET_NIL_MESSAGE(call) || (IPC_GET_METHOD(*call) == IPC_M_CONNECT_TO_ME)){ 58 return nil_message(callid, call, answer, answer_count); 59 }else{ 60 return netif_message(callid, call, answer, answer_count); 61 } 62 } 64 63 65 64 /** Starts the bundle network interface module. … … 69 68 * @returns Other error codes as defined for each specific module message function. 70 69 */ 71 int module_start(async_client_conn_t client_connection); 72 73 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 74 if(IS_NET_NIL_MESSAGE(call) || (IPC_GET_METHOD(*call) == IPC_M_CONNECT_TO_ME)){ 75 return nil_message(callid, call, answer, answer_count); 76 }else{ 77 return netif_message(callid, call, answer, answer_count); 78 } 79 } 80 81 int module_start(async_client_conn_t client_connection){ 70 int netif_nil_module_start(async_client_conn_t client_connection){ 82 71 ERROR_DECLARE; 83 72 -
uspace/lib/net/netif/netif_standalone.c
r7d6fe4db r849ed54 36 36 37 37 #include <async.h> 38 39 38 #include <ipc/ipc.h> 40 39 41 #include "netif.h" 40 #include <netif.h> 41 #include <netif_standalone.h> 42 42 43 43 /** Delegates the messages to the netif_message() function. … … 50 50 * @returns Other error codes as defined for each specific module message function. 51 51 */ 52 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 52 int netif_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 53 return netif_message(callid, call, answer, answer_count); 54 } 53 55 54 56 /** Starts the network interface module. … … 58 60 * @returns Other error codes as defined for each specific module message function. 59 61 */ 60 int module_start(async_client_conn_t client_connection); 61 62 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 63 return netif_message(callid, call, answer, answer_count); 64 } 65 66 int module_start(async_client_conn_t client_connection){ 62 int netif_module_start(async_client_conn_t client_connection){ 67 63 ERROR_DECLARE; 68 64 -
uspace/lib/net/nil/nil_remote.c
r7d6fe4db r849ed54 36 36 */ 37 37 38 #include "../messages.h" 39 40 #include "../include/device.h" 41 #include "../include/nil_interface.h" 42 43 #include "../structures/packet/packet.h" 44 #include "../structures/packet/packet_client.h" 45 46 #include "nil_messages.h" 38 #include <net_messages.h> 39 #include <net_device.h> 40 #include <nil_interface.h> 41 #include <packet/packet.h> 42 #include <packet/packet_client.h> 43 #include <nil_messages.h> 47 44 48 45 int nil_device_state_msg(int nil_phone, device_id_t device_id, int state){ -
uspace/lib/net/tl/icmp_client.c
r7d6fe4db r849ed54 36 36 */ 37 37 38 #include <errno.h>39 40 38 #ifdef CONFIG_DEBUG 41 39 #include <stdio.h> 42 40 #endif 43 41 42 #include <errno.h> 44 43 #include <sys/types.h> 45 44 46 #include "../../include/icmp_codes.h" 47 #include "../../include/icmp_client.h" 48 49 #include "../../structures/packet/packet.h" 50 #include "../../structures/packet/packet_client.h" 51 52 #include "icmp_header.h" 45 #include <icmp_codes.h> 46 #include <icmp_client.h> 47 #include <packet/packet.h> 48 #include <packet/packet_client.h> 49 #include <icmp_header.h> 53 50 54 51 int icmp_client_process_packet(packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu){ -
uspace/lib/net/tl/icmp_remote.c
r7d6fe4db r849ed54 38 38 #include <async.h> 39 39 #include <errno.h> 40 41 40 #include <ipc/ipc.h> 42 41 #include <ipc/services.h> 43 44 42 #include <sys/types.h> 45 43 46 #include "../../messages.h" 47 #include "../../modules.h" 48 49 #include "../../include/icmp_interface.h" 50 51 #include "../../structures/packet/packet_client.h" 52 53 #include "icmp_messages.h" 44 #include <net_messages.h> 45 #include <net_modules.h> 46 #include <icmp_interface.h> 47 #include <packet/packet_client.h> 48 #include <icmp_messages.h> 54 49 55 50 int icmp_destination_unreachable_msg(int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet){ -
uspace/lib/net/tl/tl_common.c
r7d6fe4db r849ed54 39 39 #include <ipc/services.h> 40 40 41 #include "../err.h" 42 43 #include "../structures/packet/packet.h" 44 #include "../structures/packet/packet_client.h" 45 46 #include "../include/device.h" 47 #include "../include/icmp_interface.h" 48 #include "../include/in.h" 49 #include "../include/in6.h" 50 #include "../include/inet.h" 51 #include "../include/ip_interface.h" 52 #include "../include/socket_codes.h" 53 #include "../include/socket_errno.h" 54 55 #include "tl_common.h" 41 #include <net_err.h> 42 #include <packet/packet.h> 43 #include <packet/packet_client.h> 44 #include <net_device.h> 45 #include <icmp_interface.h> 46 #include <in.h> 47 #include <in6.h> 48 #include <inet.h> 49 #include <ip_interface.h> 50 #include <socket_codes.h> 51 #include <socket_errno.h> 52 #include <tl_common.h> 56 53 57 54 DEVICE_MAP_IMPLEMENT(packet_dimensions, packet_dimension_t);
Note:
See TracChangeset
for help on using the changeset viewer.