Changeset 89ac5513 in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2013-06-23T19:54:53Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

Location:
uspace/lib/c/include
Files:
3 added
13 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/device/hw_res_parsed.h

    r3abf0760 r89ac5513  
    127127        free(list->dma_channels.channels);
    128128       
    129         bzero(list, sizeof(hw_res_list_parsed_t));
     129        memset(list, 0, sizeof(hw_res_list_parsed_t));
    130130}
    131131
     
    136136static inline void hw_res_list_parsed_init(hw_res_list_parsed_t *list)
    137137{
    138         bzero(list, sizeof(hw_res_list_parsed_t));
     138        memset(list, 0, sizeof(hw_res_list_parsed_t));
    139139}
    140140
  • uspace/lib/c/include/inet/inet.h

    r3abf0760 r89ac5513  
    3636#define LIBC_INET_INET_H_
    3737
     38#include <inet/addr.h>
    3839#include <sys/types.h>
    3940
    4041#define INET_TTL_MAX 255
    41 
    42 typedef struct {
    43         uint32_t ipv4;
    44 } inet_addr_t;
    4542
    4643typedef struct {
  • uspace/lib/c/include/inet/inetcfg.h

    r3abf0760 r89ac5513  
    3838#include <inet/inet.h>
    3939#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;
    4840
    4941/** Address object info */
  • uspace/lib/c/include/inet/inetping.h

    r3abf0760 r89ac5513  
    4040
    4141typedef struct {
    42         inet_addr_t src;
    43         inet_addr_t dest;
     42        uint32_t src;
     43        uint32_t dest;
    4444        uint16_t seq_no;
    4545        void *data;
     
    5353extern int inetping_init(inetping_ev_ops_t *);
    5454extern int inetping_send(inetping_sdu_t *);
    55 extern int inetping_get_srcaddr(inet_addr_t *, inet_addr_t *);
    56 
     55extern int inetping_get_srcaddr(uint32_t, uint32_t *);
    5756
    5857#endif
  • uspace/lib/c/include/inet/iplink.h

    r3abf0760 r89ac5513  
    3838#include <async.h>
    3939#include <sys/types.h>
     40#include <inet/addr.h>
    4041
    4142struct iplink_ev_ops;
     
    4647} iplink_t;
    4748
    48 typedef struct {
    49         uint32_t ipv4;
    50 } iplink_addr_t;
    51 
    52 /** IP link Service Data Unit */
     49/** IPv4 link Service Data Unit */
    5350typedef struct {
    5451        /** Local source address */
    55         iplink_addr_t lsrc;
     52        uint32_t lsrc;
    5653        /** Local destination address */
    57         iplink_addr_t ldest;
     54        uint32_t ldest;
    5855        /** Serialized IP packet */
    5956        void *data;
     
    6158        size_t size;
    6259} iplink_sdu_t;
     60
     61/** IPv6 link Service Data Unit */
     62typedef 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;
    6370
    6471typedef struct iplink_ev_ops {
     
    6976extern void iplink_close(iplink_t *);
    7077extern int iplink_send(iplink_t *, iplink_sdu_t *);
    71 extern int iplink_addr_add(iplink_t *, iplink_addr_t *);
    72 extern int iplink_addr_remove(iplink_t *, iplink_addr_t *);
     78extern int iplink_addr_add(iplink_t *, inet_addr_t *);
     79extern int iplink_addr_remove(iplink_t *, inet_addr_t *);
    7380extern int iplink_get_mtu(iplink_t *, size_t *);
    7481
  • uspace/lib/c/include/inet/iplink_srv.h

    r3abf0760 r89ac5513  
    5151} iplink_srv_t;
    5252
    53 typedef struct {
    54         uint32_t ipv4;
    55 } iplink_srv_addr_t;
    56 
    5753/** IP link Service Data Unit */
    5854typedef struct {
    5955        /** Local source address */
    60         iplink_srv_addr_t lsrc;
     56        uint32_t lsrc;
    6157        /** Local destination address */
    62         iplink_srv_addr_t ldest;
     58        uint32_t ldest;
    6359        /** Serialized IP packet */
    6460        void *data;
     
    7268        int (*send)(iplink_srv_t *, iplink_srv_sdu_t *);
    7369        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);
    7672} iplink_ops_t;
    7773
  • uspace/lib/c/include/io/verify.h

    r3abf0760 r89ac5513  
    3838#ifndef NVERIFY_PRINTF
    3939
     40#ifdef __clang__
     41#define PRINTF_ATTRIBUTE(start, end) \
     42        __attribute__((format(__printf__, start, end)))
     43#else
    4044#define PRINTF_ATTRIBUTE(start, end) \
    4145        __attribute__((format(gnu_printf, start, end)))
     46#endif
    4247
    4348#else /* NVERIFY_PRINTF */
  • uspace/lib/c/include/ipc/services.h

    r3abf0760 r89ac5513  
    5353} services_t;
    5454
     55#define SERVICE_NAME_DNSR     "net/dnsr"
    5556#define SERVICE_NAME_INET     "net/inet"
    5657#define SERVICE_NAME_INETCFG  "net/inetcfg"
  • uspace/lib/c/include/mem.h

    r3abf0760 r89ac5513  
    3838#include <sys/types.h>
    3939
    40 #define bzero(ptr, len)  memset((ptr), 0, (len))
    41 
    4240extern void *memset(void *, int, size_t)
    4341    __attribute__ ((optimize("-fno-tree-loop-distribute-patterns")));
     
    4543    __attribute__ ((optimize("-fno-tree-loop-distribute-patterns")));
    4644extern void *memmove(void *, const void *, size_t);
    47 
    48 extern int bcmp(const void *, const void *, size_t);
     45extern int memcmp(const void *, const void *, size_t);
    4946
    5047#endif
  • uspace/lib/c/include/net/in.h

    r3abf0760 r89ac5513  
    4747#define INADDR_ANY 0
    4848
    49 /** Type definition of the INET address.
    50  * @see in_addr
    51  */
    52 typedef struct in_addr in_addr_t;
    53 
    54 /** Type definition of the INET socket address.
    55  * @see sockaddr_in
    56  */
    57 typedef struct sockaddr_in      sockaddr_in_t;
    58 
    5949/** INET address. */
    60 struct in_addr {
     50typedef struct in_addr {
    6151        /** 4 byte IP address. */
    6252        uint32_t s_addr;
    63 };
     53} in_addr_t;
    6454
    6555/** INET socket address.
    6656 * @see sockaddr
    6757 */
    68 struct sockaddr_in {
     58typedef struct sockaddr_in {
    6959        /** Address family. Should be AF_INET. */
    7060        uint16_t sin_family;
     
    7262        uint16_t sin_port;
    7363        /** Internet address. */
    74         struct in_addr sin_addr;
     64        in_addr_t sin_addr;
    7565        /** Padding to meet the sockaddr size. */
    7666        uint8_t sin_zero[8];
    77 };
     67} sockaddr_in_t;
    7868
    7969#endif
  • uspace/lib/c/include/net/ip_protocols.h

    r3abf0760 r89ac5513  
    4444/*@{*/
    4545
    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
    4950
    5051/*@}*/
  • uspace/lib/c/include/net/socket_codes.h

    r3abf0760 r89ac5513  
    4545
    4646enum {
    47         AF_UNKNOWN = 0,
     47        AF_NONE = 0,
    4848        AF_INET,        /* IPv4 address */
    4949        AF_INET6        /* IPv6 address */
  • uspace/lib/c/include/str.h

    r3abf0760 r89ac5513  
    109109extern char *str_ndup(const char *, size_t max_size);
    110110
    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 *);
     111extern int str_uint8_t(const char *, const char **, unsigned int, bool,
     112    uint8_t *);
     113extern int str_uint16_t(const char *, const char **, unsigned int, bool,
     114    uint16_t *);
     115extern int str_uint32_t(const char *, const char **, unsigned int, bool,
     116    uint32_t *);
     117extern int str_uint64_t(const char *, const char **, unsigned int, bool,
     118    uint64_t *);
     119extern int str_size_t(const char *, const char **, unsigned int, bool,
     120    size_t *);
    116121
    117122extern void order_suffix(const uint64_t, uint64_t *, char *);
Note: See TracChangeset for help on using the changeset viewer.