Changeset 1bfd3d3 in mainline for uspace/lib/net/generic
- Timestamp:
- 2010-11-19T22:02:09Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 973ef9fc, a9c6b966
- Parents:
- cc3c2a1c
- Location:
- uspace/lib/net/generic
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/generic.c
rcc3c2a1c r1bfd3d3 92 92 * @param[out] address The desired address. 93 93 * @param[out] data The address data container. 94 * @return sEOK on success.95 * @return sEBADMEM if the address parameter and/or the data94 * @return EOK on success. 95 * @return EBADMEM if the address parameter and/or the data 96 96 * parameter is NULL. 97 * @return sOther error codes as defined for the specific service97 * @return Other error codes as defined for the specific service 98 98 * message. 99 99 */ … … 223 223 * @param[out] translation The translated values. 224 224 * @param[out] data The translation data container. 225 * @return sEOK on success.226 * @return sEINVAL if the configuration parameter is NULL.227 * @return sEINVAL if the count parameter is zero.228 * @return sEBADMEM if the translation or the data parameters are225 * @return EOK on success. 226 * @return EINVAL if the configuration parameter is NULL. 227 * @return EINVAL if the count parameter is zero. 228 * @return EBADMEM if the translation or the data parameters are 229 229 * NULL. 230 * @return sOther error codes as defined for the specific service230 * @return Other error codes as defined for the specific service 231 231 * message. 232 232 */ -
uspace/lib/net/generic/net_checksum.c
rcc3c2a1c r1bfd3d3 48 48 * 49 49 * @param[in] sum Computed checksum. 50 * @return sCompacted computed checksum to the 16 bits.50 * @return Compacted computed checksum to the 16 bits. 51 51 */ 52 52 uint16_t compact_checksum(uint32_t sum) … … 66 66 * @param[in] data Pointer to the beginning of data to process. 67 67 * @param[in] length Length of the data in bytes. 68 * @return sThe computed checksum of the length bytes of the data.68 * @return The computed checksum of the length bytes of the data. 69 69 */ 70 70 uint32_t compute_checksum(uint32_t seed, uint8_t *data, size_t length) … … 88 88 * @param[in] data Pointer to the beginning of data to process. 89 89 * @param[in] length Length of the data in bits. 90 * @return sThe computed CRC32 of the length bits of the data.90 * @return The computed CRC32 of the length bits of the data. 91 91 */ 92 92 uint32_t compute_crc32_be(uint32_t seed, uint8_t * data, size_t length) … … 142 142 * @param[in] data Pointer to the beginning of data to process. 143 143 * @param[in] length Length of the data in bits. 144 * @return sThe computed CRC32 of the length bits of the data.144 * @return The computed CRC32 of the length bits of the data. 145 145 */ 146 146 uint32_t compute_crc32_le(uint32_t seed, uint8_t * data, size_t length) … … 193 193 * 194 194 * @param[in] checksum The computed checksum. 195 * @return sThe internet protocol header checksum.196 * @return s0xFFFF if the computed checksum is zero.195 * @return The internet protocol header checksum. 196 * @return 0xFFFF if the computed checksum is zero. 197 197 */ 198 198 uint16_t flip_checksum(uint16_t checksum) … … 211 211 * @param[in] data The header data. 212 212 * @param[in] length The header length in bytes. 213 * @return sThe internet protocol header checksum.214 * @return s0xFFFF if the computed checksum is zero.213 * @return The internet protocol header checksum. 214 * @return 0xFFFF if the computed checksum is zero. 215 215 */ 216 216 uint16_t ip_checksum(uint8_t *data, size_t length) -
uspace/lib/net/generic/net_remote.c
rcc3c2a1c r1bfd3d3 49 49 /** Connects to the networking module. 50 50 * 51 * @return sThe networking module phone on success.51 * @return The networking module phone on success. 52 52 */ 53 53 int net_connect_module(void) … … 83 83 * @param[in] count The configuration entries count. 84 84 * @param[in,out] data The configuration and settings data. 85 * @return sEOK on success.86 * @return sEINVAL if the configuration is NULL.87 * @return sEINVAL if the count is zero.88 * @return sOther error codes as defined for the85 * @return EOK on success. 86 * @return EINVAL if the configuration is NULL. 87 * @return EINVAL if the count is zero. 88 * @return Other error codes as defined for the 89 89 * generic_translate_req() function. 90 90 */ … … 110 110 * @param[in] count The configuration entries count. 111 111 * @param[in,out] data The configuration and settings data. 112 * @return sEOK on success.113 * @return sEINVAL if the configuration is NULL.114 * @return sEINVAL if the count is zero.115 * @return sOther error codes as defined for the112 * @return EOK on success. 113 * @return EINVAL if the configuration is NULL. 114 * @return EINVAL if the count is zero. 115 * @return Other error codes as defined for the 116 116 * generic_translate_req() function. 117 117 */ -
uspace/lib/net/generic/packet_client.c
rcc3c2a1c r1bfd3d3 53 53 * @param[in] data The data to be copied. 54 54 * @param[in] length The length of the copied data. 55 * @return sEOK on success.56 * @return sEINVAL if the packet is not valid.57 * @return sENOMEM if there is not enough memory left.55 * @return EOK on success. 56 * @return EINVAL if the packet is not valid. 57 * @return ENOMEM if there is not enough memory left. 58 58 */ 59 59 int packet_copy_data(packet_t packet, const void *data, size_t length) … … 78 78 * @param[in] length The space length to be allocated at the beginning of the 79 79 * packet content. 80 * @return sThe pointer to the allocated memory.81 * @return sNULL if there is not enough memory left.80 * @return The pointer to the allocated memory. 81 * @return NULL if there is not enough memory left. 82 82 */ 83 83 void *packet_prefix(packet_t packet, size_t length) … … 99 99 * @param[in] length The space length to be allocated at the end of the 100 100 * packet content. 101 * @return sThe pointer to the allocated memory.102 * @return sNULL if there is not enough memory left.101 * @return The pointer to the allocated memory. 102 * @return NULL if there is not enough memory left. 103 103 */ 104 104 void *packet_suffix(packet_t packet, size_t length) … … 120 120 * @param[in] suffix The suffix length to be removed from the end of the 121 121 * packet content. 122 * @return sEOK on success.123 * @return sEINVAL if the packet is not valid.124 * @return sENOMEM if there is not enough memory left.122 * @return EOK on success. 123 * @return EINVAL if the packet is not valid. 124 * @return ENOMEM if there is not enough memory left. 125 125 */ 126 126 int packet_trim(packet_t packet, size_t prefix, size_t suffix) … … 140 140 * 141 141 * @param[in] packet The packet. 142 * @return sThe packet identifier.143 * @return sZero if the packet is not valid.142 * @return The packet identifier. 143 * @return Zero if the packet is not valid. 144 144 */ 145 145 packet_id_t packet_get_id(const packet_t packet) … … 153 153 * @param[out] src The source address. May be NULL if not desired. 154 154 * @param[out] dest The destination address. May be NULL if not desired. 155 * @return sThe stored addresses length.156 * @return sZero if the addresses are not present.157 * @return sEINVAL if the packet is not valid.155 * @return The stored addresses length. 156 * @return Zero if the addresses are not present. 157 * @return EINVAL if the packet is not valid. 158 158 */ 159 159 int packet_get_addr(const packet_t packet, uint8_t **src, uint8_t **dest) … … 174 174 * 175 175 * @param[in] packet The packet. 176 * @return sThe packet content length in bytes.177 * @return sZero if the packet is not valid.176 * @return The packet content length in bytes. 177 * @return Zero if the packet is not valid. 178 178 */ 179 179 size_t packet_get_data_length(const packet_t packet) … … 188 188 * 189 189 * @param[in] packet The packet. 190 * @return sThe pointer to the beginning of the packet content.191 * @return sNULL if the packet is not valid.190 * @return The pointer to the beginning of the packet content. 191 * @return NULL if the packet is not valid. 192 192 */ 193 193 void *packet_get_data(const packet_t packet) … … 205 205 * @param[in] dest The new destination address. May be NULL. 206 206 * @param[in] addr_len The addresses length. 207 * @return sEOK on success.208 * @return sEINVAL if the packet is not valid.209 * @return sENOMEM if there is not enough memory left.207 * @return EOK on success. 208 * @return EINVAL if the packet is not valid. 209 * @return ENOMEM if there is not enough memory left. 210 210 */ 211 211 int … … 254 254 * @param[in] phone The packet server module phone. 255 255 * @param[in] packet The original packet. 256 * @return sThe packet copy.257 * @return sNULL on error.256 * @return The packet copy. 257 * @return NULL on error. 258 258 */ 259 259 packet_t packet_get_copy(int phone, packet_t packet) -
uspace/lib/net/generic/packet_remote.c
rcc3c2a1c r1bfd3d3 100 100 * @param[out] packet The packet reference. 101 101 * @param[in] packet_id The packet identifier. 102 * @return sEOK on success.103 * @return sEINVAL if the packet parameter is NULL.104 * @return sOther error codes as defined for the NET_PACKET_GET_SIZE102 * @return EOK on success. 103 * @return EINVAL if the packet parameter is NULL. 104 * @return Other error codes as defined for the NET_PACKET_GET_SIZE 105 105 * message. 106 * @return sOther error codes as defined for the packet_return()106 * @return Other error codes as defined for the packet_return() 107 107 * function. 108 108 */ … … 145 145 * @param[in] max_content The maximal content length in bytes. 146 146 * @param[in] max_suffix The maximal suffix length in bytes. 147 * @return sThe packet reference.148 * @return sNULL on error.147 * @return The packet reference. 148 * @return NULL on error. 149 149 */ 150 150 packet_t packet_get_4_remote(int phone, size_t max_content, size_t addr_len, … … 177 177 * @param[in] phone The packet server module phone. 178 178 * @param[in] content The maximal content length in bytes. 179 * @return sThe packet reference.180 * @return sNULL on error.179 * @return The packet reference. 180 * @return NULL on error. 181 181 */ 182 182 packet_t packet_get_1_remote(int phone, size_t content) -
uspace/lib/net/generic/protocol_map.c
rcc3c2a1c r1bfd3d3 42 42 * @param[in] nil Network interface layer service. 43 43 * @param[in] il Internetwork layer service. 44 * @return sNetwork interface layer type of the internetworking44 * @return Network interface layer type of the internetworking 45 45 * layer service. 46 * @return sZero if mapping is not found.46 * @return Zero if mapping is not found. 47 47 */ 48 48 eth_type_t protocol_map(services_t nil, services_t il) … … 68 68 * @param[in] nil Network interface layer service. 69 69 * @param[in] protocol Network interface layer type. 70 * @return sInternetwork layer service of the network interface70 * @return Internetwork layer service of the network interface 71 71 * layer type. 72 * @return sZero if mapping is not found.72 * @return Zero if mapping is not found. 73 73 */ 74 74 services_t protocol_unmap(services_t nil, int protocol) … … 94 94 * 95 95 * @param[in] lsap Link service access point identifier. 96 * @return sEthernet protocol identifier of the link service access96 * @return Ethernet protocol identifier of the link service access 97 97 * point identifier. 98 * @return sETH_LSAP_NULL if mapping is not found.98 * @return ETH_LSAP_NULL if mapping is not found. 99 99 */ 100 100 eth_type_t lsap_map(eth_lsap_t lsap) … … 114 114 * 115 115 * @param[in] ethertype Ethernet protocol identifier. 116 * @return sLink service access point identifier.117 * @return sZero if mapping is not found.116 * @return Link service access point identifier. 117 * @return Zero if mapping is not found. 118 118 */ 119 119 eth_lsap_t lsap_unmap(eth_type_t ethertype) … … 132 132 * 133 133 * @param[in] nil The network interface service. 134 * @return sThe hardware type of the network interface service.135 * @return sZero if mapping is not found.134 * @return The hardware type of the network interface service. 135 * @return Zero if mapping is not found. 136 136 */ 137 137 hw_type_t hardware_map(services_t nil)
Note:
See TracChangeset
for help on using the changeset viewer.