Changeset e526f08 in mainline
- Timestamp:
- 2010-10-14T19:37:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a358279
- Parents:
- db5f8d3
- Location:
- uspace
- Files:
-
- 31 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/device.h
rdb5f8d3 re526f08 27 27 */ 28 28 29 /** @addtogroup netif30 * 29 /** @addtogroup libc 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * 34 * Device identifier, state and usage statistics. 35 35 */ 36 36 37 #ifndef __NET_DEVICE_ID_TYPE_H__38 #define __NET_DEVICE_ID_TYPE_H__37 #ifndef LIBC_DEVICE_ID_TYPE_H_ 38 #define LIBC_DEVICE_ID_TYPE_H_ 39 39 40 40 #include <adt/int_map.h> 41 41 42 /** Device identifier to generic type map declaration. 43 */ 44 #define DEVICE_MAP_DECLARE INT_MAP_DECLARE 42 /** Device identifier to generic type map declaration. */ 43 #define DEVICE_MAP_DECLARE INT_MAP_DECLARE 45 44 46 /** Device identifier to generic type map implementation. 47 */ 45 /** Device identifier to generic type map implementation. */ 48 46 #define DEVICE_MAP_IMPLEMENT INT_MAP_IMPLEMENT 49 47 50 /** Invalid device identifier. 51 */ 52 #define DEVICE_INVALID_ID (-1) 48 /** Invalid device identifier. */ 49 #define DEVICE_INVALID_ID (-1) 53 50 54 /** Device identifier type. 55 */ 56 typedef int device_id_t; 51 /** Device identifier type. */ 52 typedef int device_id_t; 57 53 58 /** Device state type. 59 */ 60 typedef enum device_state device_state_t; 54 /** Device state type. */ 55 typedef enum device_state device_state_t; 61 56 62 57 /** Type definition of the device usage statistics. 63 * 58 * @see device_stats 64 59 */ 65 typedef struct device_stats 60 typedef struct device_stats device_stats_t; 66 61 67 62 /** Type definition of the device usage statistics pointer. 68 * 63 * @see device_stats 69 64 */ 70 typedef device_stats_t * 65 typedef device_stats_t *device_stats_ref; 71 66 72 /** Device state. 73 */ 74 enum device_state{ 75 /** Device not present or not initialized. 76 */ 67 /** Device state. */ 68 enum device_state { 69 /** Device not present or not initialized. */ 77 70 NETIF_NULL = 0, 78 /** Device present and stopped. 79 */ 71 /** Device present and stopped. */ 80 72 NETIF_STOPPED, 81 /** Device present and active. 82 */ 73 /** Device present and active. */ 83 74 NETIF_ACTIVE, 84 /** Device present but unable to transmit. 85 */ 75 /** Device present but unable to transmit. */ 86 76 NETIF_CARRIER_LOST 87 77 }; 88 78 89 /** Device usage statistics. 90 */ 91 struct device_stats{ 92 /** Total packets received. 93 */ 79 /** Device usage statistics. */ 80 struct device_stats { 81 /** Total packets received. */ 94 82 unsigned long receive_packets; 95 /** Total packets transmitted. 96 */ 83 /** Total packets transmitted. */ 97 84 unsigned long send_packets; 98 /** Total bytes received. 99 */ 85 /** Total bytes received. */ 100 86 unsigned long receive_bytes; 101 /** Total bytes transmitted. 102 */ 87 /** Total bytes transmitted. */ 103 88 unsigned long send_bytes; 104 /** Bad packets received counter. 105 */ 89 /** Bad packets received counter. */ 106 90 unsigned long receive_errors; 107 /** Packet transmition problems counter. 108 */ 91 /** Packet transmition problems counter. */ 109 92 unsigned long send_errors; 110 /** No space in buffers counter. 111 */ 93 /** No space in buffers counter. */ 112 94 unsigned long receive_dropped; 113 /** No space available counter. 114 */ 95 /** No space available counter. */ 115 96 unsigned long send_dropped; 116 /** Total multicast packets received. 117 */ 97 /** Total multicast packets received. */ 118 98 unsigned long multicast; 119 /** The number of collisions due to congestion on the medium. 120 */ 99 /** The number of collisions due to congestion on the medium. */ 121 100 unsigned long collisions; 122 101 123 /* detailed receive_errors :*/124 /** Received packet length error counter. 125 */102 /* detailed receive_errors */ 103 104 /** Received packet length error counter. */ 126 105 unsigned long receive_length_errors; 127 /** Receiver buffer overflow counter. 128 */ 106 /** Receiver buffer overflow counter. */ 129 107 unsigned long receive_over_errors; 130 /** Received packet with crc error counter. 131 */ 108 /** Received packet with crc error counter. */ 132 109 unsigned long receive_crc_errors; 133 /** Received frame alignment error counter. 134 */ 110 /** Received frame alignment error counter. */ 135 111 unsigned long receive_frame_errors; 136 /** Receiver fifo overrun counter. 137 */ 112 /** Receiver fifo overrun counter. */ 138 113 unsigned long receive_fifo_errors; 139 /** Receiver missed packet counter. 140 */ 114 /** Receiver missed packet counter. */ 141 115 unsigned long receive_missed_errors; 142 116 143 117 /* detailed send_errors */ 144 /** Transmitter aborted counter. 145 */118 119 /** Transmitter aborted counter. */ 146 120 unsigned long send_aborted_errors; 147 /** Transmitter carrier errors counter. 148 */ 121 /** Transmitter carrier errors counter. */ 149 122 unsigned long send_carrier_errors; 150 /** Transmitter fifo overrun counter. 151 */ 123 /** Transmitter fifo overrun counter. */ 152 124 unsigned long send_fifo_errors; 153 /** Transmitter carrier errors counter. 154 */ 125 /** Transmitter carrier errors counter. */ 155 126 unsigned long send_heartbeat_errors; 156 /** Transmitter window errors counter. 157 */ 127 /** Transmitter window errors counter. */ 158 128 unsigned long send_window_errors; 159 129 160 130 /* for cslip etc */ 161 /** Total compressed packets received.162 */131 132 /** Total compressed packets received. */ 163 133 unsigned long receive_compressed; 164 /** Total compressed packet transmitted. 165 */ 134 /** Total compressed packet transmitted. */ 166 135 unsigned long send_compressed; 167 136 }; … … 171 140 /** @} 172 141 */ 173 -
uspace/lib/net/generic/net_remote.c
rdb5f8d3 re526f08 42 42 #include <net_messages.h> 43 43 #include <net/modules.h> 44 #include <net _device.h>44 #include <net/device.h> 45 45 #include <net_interface.h> 46 46 #include <adt/measured_strings.h> -
uspace/lib/net/il/arp_remote.c
rdb5f8d3 re526f08 43 43 #include <net_messages.h> 44 44 #include <net/modules.h> 45 #include <net _device.h>45 #include <net/device.h> 46 46 #include <arp_interface.h> 47 47 #include <adt/measured_strings.h> -
uspace/lib/net/il/ip_remote.c
rdb5f8d3 re526f08 44 44 #include <net_messages.h> 45 45 #include <net/modules.h> 46 #include <net _device.h>46 #include <net/device.h> 47 47 #include <net/inet.h> 48 48 #include <ip_interface.h> -
uspace/lib/net/include/arp_interface.h
rdb5f8d3 re526f08 35 35 36 36 #include <adt/measured_strings.h> 37 #include <net _device.h>37 #include <net/device.h> 38 38 39 39 /** @name ARP module interface -
uspace/lib/net/include/icmp_interface.h
rdb5f8d3 re526f08 37 37 #include <sys/types.h> 38 38 39 #include <net _device.h>39 #include <net/device.h> 40 40 #include <adt/measured_strings.h> 41 41 #include <net/packet.h> -
uspace/lib/net/include/il_interface.h
rdb5f8d3 re526f08 44 44 45 45 #include <net_messages.h> 46 #include <net _device.h>46 #include <net/device.h> 47 47 #include <net/packet.h> 48 48 #include <packet_client.h> -
uspace/lib/net/include/ip_interface.h
rdb5f8d3 re526f08 38 38 #include <ipc/services.h> 39 39 40 #include <net _device.h>40 #include <net/device.h> 41 41 #include <net/packet.h> 42 42 -
uspace/lib/net/include/net_interface.h
rdb5f8d3 re526f08 36 36 #include <ipc/services.h> 37 37 38 #include <net _device.h>38 #include <net/device.h> 39 39 #include <adt/measured_strings.h> 40 40 -
uspace/lib/net/include/netif_local.h
rdb5f8d3 re526f08 46 46 47 47 #include <adt/measured_strings.h> 48 #include <net _device.h>48 #include <net/device.h> 49 49 #include <net/packet.h> 50 50 -
uspace/lib/net/include/nil_interface.h
rdb5f8d3 re526f08 43 43 #include <net/packet.h> 44 44 #include <nil_messages.h> 45 #include <net _device.h>45 #include <net/device.h> 46 46 47 47 #define nil_bind_service(service, device_id, me, receiver) \ -
uspace/lib/net/include/socket_core.h
rdb5f8d3 re526f08 41 41 42 42 #include <net/in.h> 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <adt/generic_char_map.h> 45 45 #include <adt/dynamic_fifo.h> -
uspace/lib/net/include/tl_common.h
rdb5f8d3 re526f08 40 40 #include <net/socket_codes.h> 41 41 #include <net/packet.h> 42 #include <net _device.h>42 #include <net/device.h> 43 43 #include <net/inet.h> 44 44 -
uspace/lib/net/include/tl_interface.h
rdb5f8d3 re526f08 42 42 43 43 #include <net_messages.h> 44 #include <net _device.h>44 #include <net/device.h> 45 45 #include <net/packet.h> 46 46 #include <packet_client.h> -
uspace/lib/net/netif/netif_local.c
rdb5f8d3 re526f08 51 51 #include <packet_remote.h> 52 52 #include <adt/measured_strings.h> 53 #include <net _device.h>53 #include <net/device.h> 54 54 #include <nil_interface.h> 55 55 #include <netif_local.h> -
uspace/lib/net/netif/netif_remote.c
rdb5f8d3 re526f08 41 41 #include <net/packet.h> 42 42 #include <packet_client.h> 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <netif_remote.h> 45 45 #include <netif_messages.h> -
uspace/lib/net/nil/nil_remote.c
rdb5f8d3 re526f08 37 37 38 38 #include <net_messages.h> 39 #include <net _device.h>39 #include <net/device.h> 40 40 #include <nil_interface.h> 41 41 #include <net/packet.h> -
uspace/lib/net/tl/tl_common.c
rdb5f8d3 re526f08 48 48 #include <packet_client.h> 49 49 #include <packet_remote.h> 50 #include <net _device.h>50 #include <net/device.h> 51 51 #include <icmp_interface.h> 52 52 #include <ip_remote.h> -
uspace/lib/socket/include/net_messages.h
rdb5f8d3 re526f08 42 42 #include <ipc/services.h> 43 43 44 #include <net _device.h>44 #include <net/device.h> 45 45 #include <adt/measured_strings.h> 46 46 #include <net/packet.h> -
uspace/srv/hw/netif/dp8390/dp8390_module.c
rdb5f8d3 re526f08 48 48 #include <packet_client.h> 49 49 #include <adt/measured_strings.h> 50 #include <net _device.h>50 #include <net/device.h> 51 51 #include <nil_interface.h> 52 52 #include <netif_interface.h> -
uspace/srv/net/il/arp/arp.c
rdb5f8d3 re526f08 50 50 #include <net_messages.h> 51 51 #include <net/modules.h> 52 #include <net _device.h>52 #include <net/device.h> 53 53 #include <arp_interface.h> 54 54 #include <nil_interface.h> -
uspace/srv/net/il/arp/arp.h
rdb5f8d3 re526f08 43 43 #include <ipc/services.h> 44 44 45 #include <net _device.h>45 #include <net/device.h> 46 46 #include <net_hardware.h> 47 47 #include <adt/generic_char_map.h> -
uspace/srv/net/il/ip/ip.c
rdb5f8d3 re526f08 56 56 #include <arp_interface.h> 57 57 #include <net_checksum.h> 58 #include <net _device.h>58 #include <net/device.h> 59 59 #include <icmp_client.h> 60 60 #include <net/icmp_codes.h> -
uspace/srv/net/il/ip/ip.h
rdb5f8d3 re526f08 42 42 #include <ipc/services.h> 43 43 44 #include <net _device.h>44 #include <net/device.h> 45 45 #include <net/inet.h> 46 46 #include <ip_interface.h> -
uspace/srv/net/net/net.c
rdb5f8d3 re526f08 57 57 #include <il_messages.h> 58 58 #include <netif_remote.h> 59 #include <net _device.h>59 #include <net/device.h> 60 60 #include <nil_interface.h> 61 61 #include <net_interface.h> -
uspace/srv/net/net/net.h
rdb5f8d3 re526f08 41 41 #include <ipc/ipc.h> 42 42 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <adt/char_map.h> 45 45 #include <adt/generic_char_map.h> -
uspace/srv/net/netif/lo/lo.c
rdb5f8d3 re526f08 48 48 #include <adt/measured_strings.h> 49 49 #include <packet_client.h> 50 #include <net _device.h>50 #include <net/device.h> 51 51 #include <nil_interface.h> 52 52 #include <nil_messages.h> -
uspace/srv/net/nil/eth/eth.c
rdb5f8d3 re526f08 53 53 #include <ethernet_protocols.h> 54 54 #include <protocol_map.h> 55 #include <net _device.h>55 #include <net/device.h> 56 56 #include <netif_interface.h> 57 57 #include <net_interface.h> -
uspace/srv/net/nil/eth/eth.h
rdb5f8d3 re526f08 41 41 #include <ipc/services.h> 42 42 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <adt/measured_strings.h> 45 45 -
uspace/srv/net/nil/nildummy/nildummy.c
rdb5f8d3 re526f08 47 47 #include <net_messages.h> 48 48 #include <net/modules.h> 49 #include <net _device.h>49 #include <net/device.h> 50 50 #include <netif_interface.h> 51 51 #include <nil_interface.h> -
uspace/srv/net/nil/nildummy/nildummy.h
rdb5f8d3 re526f08 41 41 #include <ipc/services.h> 42 42 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <adt/measured_strings.h> 45 45 -
uspace/srv/net/tl/tcp/tcp.h
rdb5f8d3 re526f08 41 41 42 42 #include <net/packet.h> 43 #include <net _device.h>43 #include <net/device.h> 44 44 #include <socket_core.h> 45 45 #include <tl_common.h>
Note:
See TracChangeset
for help on using the changeset viewer.