Changeset c5bff3c in mainline for uspace/lib/c/include/inet/inet.h
- Timestamp:
- 2012-04-28T16:22:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8013637
- Parents:
- 81716eb (diff), 76983ff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/inet/inet.h
r81716eb rc5bff3c 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2012 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib net29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 33 32 /** @file 34 * Hardware types according to the on-line IANA - Address Resolution Protocol35 * (ARP) Parameters36 * http://www.iana.org/assignments/arp-parameters/arp-parameters.xml,37 * cited January 14 2009.38 33 */ 39 34 40 #ifndef LIB NET_NET_HARDWARE_H_41 #define LIB NET_NET_HARDWARE_H_35 #ifndef LIBC_INET_INET_H_ 36 #define LIBC_INET_INET_H_ 42 37 43 38 #include <sys/types.h> 44 39 45 /** Network interface layer type type definition. */ 46 typedef uint8_t hw_type_t; 40 #define INET_TTL_MAX 255 47 41 48 /** @name Network interface layer types definitions */ 49 /*@{*/ 42 typedef struct { 43 uint32_t ipv4; 44 } inet_addr_t; 50 45 51 /** Ethernet (10Mb) hardware type. */ 52 #define HW_ETHER 1 46 typedef struct { 47 inet_addr_t src; 48 inet_addr_t dest; 49 uint8_t tos; 50 void *data; 51 size_t size; 52 } inet_dgram_t; 53 53 54 /*@}*/ 54 typedef struct { 55 int (*recv)(inet_dgram_t *); 56 } inet_ev_ops_t; 57 58 typedef enum { 59 INET_DF = 1 60 } inet_df_t; 61 62 extern int inet_init(uint8_t, inet_ev_ops_t *); 63 extern int inet_send(inet_dgram_t *, uint8_t, inet_df_t); 64 extern int inet_get_srcaddr(inet_addr_t *, uint8_t, inet_addr_t *); 55 65 56 66 #endif … … 58 68 /** @} 59 69 */ 60
Note:
See TracChangeset
for help on using the changeset viewer.