Changeset 89ac5513 in mainline for uspace/lib/c/include
- Timestamp:
- 2013-06-23T19:54:53Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ddb1922
- Parents:
- 3abf0760 (diff), 96cbd18 (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. - Location:
- uspace/lib/c/include
- Files:
-
- 3 added
- 13 edited
-
device/hw_res_parsed.h (modified) (2 diffs)
-
inet/addr.h (added)
-
inet/dnsr.h (added)
-
inet/inet.h (modified) (1 diff)
-
inet/inetcfg.h (modified) (1 diff)
-
inet/inetping.h (modified) (2 diffs)
-
inet/iplink.h (modified) (4 diffs)
-
inet/iplink_srv.h (modified) (2 diffs)
-
io/verify.h (modified) (1 diff)
-
ipc/dnsr.h (added)
-
ipc/services.h (modified) (1 diff)
-
mem.h (modified) (2 diffs)
-
net/in.h (modified) (2 diffs)
-
net/ip_protocols.h (modified) (1 diff)
-
net/socket_codes.h (modified) (1 diff)
-
str.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/device/hw_res_parsed.h
r3abf0760 r89ac5513 127 127 free(list->dma_channels.channels); 128 128 129 bzero(list, sizeof(hw_res_list_parsed_t));129 memset(list, 0, sizeof(hw_res_list_parsed_t)); 130 130 } 131 131 … … 136 136 static inline void hw_res_list_parsed_init(hw_res_list_parsed_t *list) 137 137 { 138 bzero(list, sizeof(hw_res_list_parsed_t));138 memset(list, 0, sizeof(hw_res_list_parsed_t)); 139 139 } 140 140 -
uspace/lib/c/include/inet/inet.h
r3abf0760 r89ac5513 36 36 #define LIBC_INET_INET_H_ 37 37 38 #include <inet/addr.h> 38 39 #include <sys/types.h> 39 40 40 41 #define INET_TTL_MAX 255 41 42 typedef struct {43 uint32_t ipv4;44 } inet_addr_t;45 42 46 43 typedef struct { -
uspace/lib/c/include/inet/inetcfg.h
r3abf0760 r89ac5513 38 38 #include <inet/inet.h> 39 39 #include <sys/types.h> 40 41 /** Network address */42 typedef struct {43 /** Address */44 uint32_t ipv4;45 /** Number of valid bits in @c ipv4 */46 int bits;47 } inet_naddr_t;48 40 49 41 /** Address object info */ -
uspace/lib/c/include/inet/inetping.h
r3abf0760 r89ac5513 40 40 41 41 typedef struct { 42 inet_addr_t src;43 inet_addr_t dest;42 uint32_t src; 43 uint32_t dest; 44 44 uint16_t seq_no; 45 45 void *data; … … 53 53 extern int inetping_init(inetping_ev_ops_t *); 54 54 extern int inetping_send(inetping_sdu_t *); 55 extern int inetping_get_srcaddr(inet_addr_t *, inet_addr_t *); 56 55 extern int inetping_get_srcaddr(uint32_t, uint32_t *); 57 56 58 57 #endif -
uspace/lib/c/include/inet/iplink.h
r3abf0760 r89ac5513 38 38 #include <async.h> 39 39 #include <sys/types.h> 40 #include <inet/addr.h> 40 41 41 42 struct iplink_ev_ops; … … 46 47 } iplink_t; 47 48 48 typedef struct { 49 uint32_t ipv4; 50 } iplink_addr_t; 51 52 /** IP link Service Data Unit */ 49 /** IPv4 link Service Data Unit */ 53 50 typedef struct { 54 51 /** Local source address */ 55 iplink_addr_t lsrc;52 uint32_t lsrc; 56 53 /** Local destination address */ 57 iplink_addr_t ldest;54 uint32_t ldest; 58 55 /** Serialized IP packet */ 59 56 void *data; … … 61 58 size_t size; 62 59 } iplink_sdu_t; 60 61 /** IPv6 link Service Data Unit */ 62 typedef struct { 63 /** Target MAC address */ 64 uint64_t hwaddr; 65 /** Serialized IP packet */ 66 void *data; 67 /** Size of @c data in bytes */ 68 size_t size; 69 } iplink_sdu6_t; 63 70 64 71 typedef struct iplink_ev_ops { … … 69 76 extern void iplink_close(iplink_t *); 70 77 extern int iplink_send(iplink_t *, iplink_sdu_t *); 71 extern int iplink_addr_add(iplink_t *, i plink_addr_t *);72 extern int iplink_addr_remove(iplink_t *, i plink_addr_t *);78 extern int iplink_addr_add(iplink_t *, inet_addr_t *); 79 extern int iplink_addr_remove(iplink_t *, inet_addr_t *); 73 80 extern int iplink_get_mtu(iplink_t *, size_t *); 74 81 -
uspace/lib/c/include/inet/iplink_srv.h
r3abf0760 r89ac5513 51 51 } iplink_srv_t; 52 52 53 typedef struct {54 uint32_t ipv4;55 } iplink_srv_addr_t;56 57 53 /** IP link Service Data Unit */ 58 54 typedef struct { 59 55 /** Local source address */ 60 iplink_srv_addr_t lsrc;56 uint32_t lsrc; 61 57 /** Local destination address */ 62 iplink_srv_addr_t ldest;58 uint32_t ldest; 63 59 /** Serialized IP packet */ 64 60 void *data; … … 72 68 int (*send)(iplink_srv_t *, iplink_srv_sdu_t *); 73 69 int (*get_mtu)(iplink_srv_t *, size_t *); 74 int (*addr_add)(iplink_srv_t *, iplink_srv_addr_t *);75 int (*addr_remove)(iplink_srv_t *, iplink_srv_addr_t *);70 int (*addr_add)(iplink_srv_t *, uint32_t); 71 int (*addr_remove)(iplink_srv_t *, uint32_t); 76 72 } iplink_ops_t; 77 73 -
uspace/lib/c/include/io/verify.h
r3abf0760 r89ac5513 38 38 #ifndef NVERIFY_PRINTF 39 39 40 #ifdef __clang__ 41 #define PRINTF_ATTRIBUTE(start, end) \ 42 __attribute__((format(__printf__, start, end))) 43 #else 40 44 #define PRINTF_ATTRIBUTE(start, end) \ 41 45 __attribute__((format(gnu_printf, start, end))) 46 #endif 42 47 43 48 #else /* NVERIFY_PRINTF */ -
uspace/lib/c/include/ipc/services.h
r3abf0760 r89ac5513 53 53 } services_t; 54 54 55 #define SERVICE_NAME_DNSR "net/dnsr" 55 56 #define SERVICE_NAME_INET "net/inet" 56 57 #define SERVICE_NAME_INETCFG "net/inetcfg" -
uspace/lib/c/include/mem.h
r3abf0760 r89ac5513 38 38 #include <sys/types.h> 39 39 40 #define bzero(ptr, len) memset((ptr), 0, (len))41 42 40 extern void *memset(void *, int, size_t) 43 41 __attribute__ ((optimize("-fno-tree-loop-distribute-patterns"))); … … 45 43 __attribute__ ((optimize("-fno-tree-loop-distribute-patterns"))); 46 44 extern void *memmove(void *, const void *, size_t); 47 48 extern int bcmp(const void *, const void *, size_t); 45 extern int memcmp(const void *, const void *, size_t); 49 46 50 47 #endif -
uspace/lib/c/include/net/in.h
r3abf0760 r89ac5513 47 47 #define INADDR_ANY 0 48 48 49 /** Type definition of the INET address.50 * @see in_addr51 */52 typedef struct in_addr in_addr_t;53 54 /** Type definition of the INET socket address.55 * @see sockaddr_in56 */57 typedef struct sockaddr_in sockaddr_in_t;58 59 49 /** INET address. */ 60 struct in_addr {50 typedef struct in_addr { 61 51 /** 4 byte IP address. */ 62 52 uint32_t s_addr; 63 } ;53 } in_addr_t; 64 54 65 55 /** INET socket address. 66 56 * @see sockaddr 67 57 */ 68 struct sockaddr_in {58 typedef struct sockaddr_in { 69 59 /** Address family. Should be AF_INET. */ 70 60 uint16_t sin_family; … … 72 62 uint16_t sin_port; 73 63 /** Internet address. */ 74 struct in_addrsin_addr;64 in_addr_t sin_addr; 75 65 /** Padding to meet the sockaddr size. */ 76 66 uint8_t sin_zero[8]; 77 } ;67 } sockaddr_in_t; 78 68 79 69 #endif -
uspace/lib/c/include/net/ip_protocols.h
r3abf0760 r89ac5513 44 44 /*@{*/ 45 45 46 #define IPPROTO_ICMP 1 47 #define IPPROTO_TCP 6 48 #define IPPROTO_UDP 17 46 #define IPPROTO_ICMP 1 47 #define IPPROTO_TCP 6 48 #define IPPROTO_UDP 17 49 #define IPPROTO_ICMPV6 58 49 50 50 51 /*@}*/ -
uspace/lib/c/include/net/socket_codes.h
r3abf0760 r89ac5513 45 45 46 46 enum { 47 AF_ UNKNOWN= 0,47 AF_NONE = 0, 48 48 AF_INET, /* IPv4 address */ 49 49 AF_INET6 /* IPv6 address */ -
uspace/lib/c/include/str.h
r3abf0760 r89ac5513 109 109 extern char *str_ndup(const char *, size_t max_size); 110 110 111 extern int str_uint8_t(const char *, char **, unsigned int, bool, uint8_t *); 112 extern int str_uint16_t(const char *, char **, unsigned int, bool, uint16_t *); 113 extern int str_uint32_t(const char *, char **, unsigned int, bool, uint32_t *); 114 extern int str_uint64_t(const char *, char **, unsigned int, bool, uint64_t *); 115 extern int str_size_t(const char *, char **, unsigned int, bool, size_t *); 111 extern int str_uint8_t(const char *, const char **, unsigned int, bool, 112 uint8_t *); 113 extern int str_uint16_t(const char *, const char **, unsigned int, bool, 114 uint16_t *); 115 extern int str_uint32_t(const char *, const char **, unsigned int, bool, 116 uint32_t *); 117 extern int str_uint64_t(const char *, const char **, unsigned int, bool, 118 uint64_t *); 119 extern int str_size_t(const char *, const char **, unsigned int, bool, 120 size_t *); 116 121 117 122 extern void order_suffix(const uint64_t, uint64_t *, char *);
Note:
See TracChangeset
for help on using the changeset viewer.
