Changeset c42f50d in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2013-10-05T11:53:43Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cbfc8b7
Parents:
408424e (diff), 3e896e1 (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:
1 added
1 deleted
8 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/inet/addr.h

    r408424e rc42f50d  
    3939#include <net/in.h>
    4040#include <net/in6.h>
     41#include <net/socket.h>
    4142
    4243typedef uint32_t addr32_t;
     
    4445typedef uint8_t addr128_t[16];
    4546
     47typedef enum {
     48        /** Any IP protocol version */
     49        ip_any,
     50        /** IPv4 */
     51        ip_v4,
     52        /** IPv6 */
     53        ip_v6
     54} ip_ver_t;
     55
    4656/** Node address */
    4757typedef struct {
    48         uint16_t family;
     58        /** IP version */
     59        ip_ver_t version;
    4960        union {
    5061                addr32_t addr;
     
    5566/** Network address */
    5667typedef struct {
    57         /** Address family */
    58         uint16_t family;
     68        /** IP version */
     69        ip_ver_t version;
    5970       
    6071        /** Address */
     
    91102    uint16_t, uint16_t, uint16_t, uint16_t, uint8_t);
    92103
    93 extern int inet_addr_family(const char *, uint16_t *);
    94104extern void inet_naddr_addr(const inet_naddr_t *, inet_addr_t *);
    95105extern void inet_addr_naddr(const inet_addr_t *, uint8_t, inet_naddr_t *);
     
    110120extern int inet_naddr_format(const inet_naddr_t *, char **);
    111121
    112 extern uint16_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
    113 extern uint16_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
     122extern ip_ver_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
     123extern ip_ver_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
    114124    uint8_t *);
    115125
     
    125135    sockaddr_in6_t *);
    126136
     137extern ip_ver_t ipver_from_af(int af);
     138extern int inet_addr_sockaddr(const inet_addr_t *, uint16_t, sockaddr_t **,
     139    socklen_t *);
     140
    127141#endif
    128142
  • uspace/lib/c/include/inet/dhcp.h

    r408424e rc42f50d  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2013 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3030 * @{
    3131 */
    32 
    3332/** @file
    34  * Network device.
    3533 */
    3634
    37 #ifndef LIBC_NET_DEVICE_H_
    38 #define LIBC_NET_DEVICE_H_
     35#ifndef LIBC_INET_DHCP_H_
     36#define LIBC_INET_DHCP_H_
    3937
    40 #include <adt/int_map.h>
    41 #include <nic/nic.h>
     38#include <sys/types.h>
    4239
    43 /** Device identifier to generic type map declaration. */
    44 #define DEVICE_MAP_DECLARE  INT_MAP_DECLARE
    45 
    46 /** Device identifier to generic type map implementation. */
    47 #define DEVICE_MAP_IMPLEMENT  INT_MAP_IMPLEMENT
    48 
    49 /** Device identifier type. */
    50 typedef int nic_device_id_t;
    51 
    52 /** Invalid device identifier. */
    53 #define NIC_DEVICE_INVALID_ID  (-1)
     40extern int dhcp_init(void);
     41extern int dhcp_link_add(sysarg_t);
     42extern int dhcp_link_remove(sysarg_t);
    5443
    5544#endif
  • uspace/lib/c/include/inet/dnsr.h

    r408424e rc42f50d  
    5151
    5252extern int dnsr_init(void);
    53 extern int dnsr_name2host(const char *, dnsr_hostinfo_t **, uint16_t);
     53extern int dnsr_name2host(const char *, dnsr_hostinfo_t **, ip_ver_t);
    5454extern void dnsr_hostinfo_destroy(dnsr_hostinfo_t *);
    5555extern int dnsr_get_srvaddr(inet_addr_t *);
  • uspace/lib/c/include/inet/inetcfg.h

    r408424e rc42f50d  
    4848extern int inetcfg_get_link_list(sysarg_t **, size_t *);
    4949extern int inetcfg_get_sroute_list(sysarg_t **, size_t *);
     50extern int inetcfg_link_add(sysarg_t);
    5051extern int inetcfg_link_get(sysarg_t, inet_link_info_t *);
     52extern int inetcfg_link_remove(sysarg_t);
    5153extern int inetcfg_sroute_get(sysarg_t, inet_sroute_info_t *);
    5254extern int inetcfg_sroute_get_id(const char *, sysarg_t *);
  • uspace/lib/c/include/inet/inetping.h

    r408424e rc42f50d  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2013 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3838#include <inet/inet.h>
    3939#include <sys/types.h>
    40 
    41 typedef struct {
    42         uint32_t src;
    43         uint32_t dest;
    44         uint16_t seq_no;
    45         void *data;
    46         size_t size;
    47 } inetping_sdu_t;
     40#include <types/inetping.h>
    4841
    4942typedef struct inetping_ev_ops {
     
    5346extern int inetping_init(inetping_ev_ops_t *);
    5447extern int inetping_send(inetping_sdu_t *);
    55 extern int inetping_get_srcaddr(uint32_t, uint32_t *);
     48extern int inetping_get_srcaddr(const inet_addr_t *, inet_addr_t *);
    5649
    5750#endif
  • uspace/lib/c/include/inet/iplink.h

    r408424e rc42f50d  
    3737
    3838#include <async.h>
    39 #include <sys/types.h>
    4039#include <inet/addr.h>
    4140
     
    7877
    7978typedef struct iplink_ev_ops {
    80         int (*recv)(iplink_t *, iplink_recv_sdu_t *, uint16_t);
     79        int (*recv)(iplink_t *, iplink_recv_sdu_t *, ip_ver_t);
    8180} iplink_ev_ops_t;
    8281
  • uspace/lib/c/include/inet/iplink_srv.h

    r408424e rc42f50d  
    3939#include <fibril_synch.h>
    4040#include <stdbool.h>
    41 #include <sys/types.h>
    4241#include <inet/addr.h>
    4342#include <inet/iplink.h>
     
    6766
    6867extern int iplink_conn(ipc_callid_t, ipc_call_t *, void *);
    69 extern int iplink_ev_recv(iplink_srv_t *, iplink_recv_sdu_t *, uint16_t);
     68extern int iplink_ev_recv(iplink_srv_t *, iplink_recv_sdu_t *, ip_ver_t);
    7069
    7170#endif
  • uspace/lib/c/include/ipc/inet.h

    r408424e rc42f50d  
    7272        INETCFG_GET_LINK_LIST,
    7373        INETCFG_GET_SROUTE_LIST,
     74        INETCFG_LINK_ADD,
    7475        INETCFG_LINK_GET,
     76        INETCFG_LINK_REMOVE,
    7577        INETCFG_SROUTE_CREATE,
    7678        INETCFG_SROUTE_DELETE,
     
    9092} inetping_request_t;
    9193
    92 /** Events on Inet ping6 port */
    93 typedef enum {
    94         INETPING6_EV_RECV = IPC_FIRST_USER_METHOD
    95 } inetping6_event_t;
    96 
    97 /** Requests on Inet ping6 port */
    98 typedef enum {
    99         INETPING6_SEND = IPC_FIRST_USER_METHOD,
    100         INETPING6_GET_SRCADDR
    101 } inetping6_request_t;
    102 
    10394#endif
    10495
  • uspace/lib/c/include/ipc/services.h

    r408424e rc42f50d  
    5454
    5555#define SERVICE_NAME_CORECFG    "corecfg"
     56#define SERVICE_NAME_DHCP       "net/dhcp"
    5657#define SERVICE_NAME_DNSR       "net/dnsr"
    5758#define SERVICE_NAME_INET       "net/inet"
     
    5960#define SERVICE_NAME_INETPING   "net/inetping"
    6061#define SERVICE_NAME_INETPING6  "net/inetping6"
     62#define SERVICE_NAME_NETCONF    "net/netconf"
    6163
    6264#endif
  • uspace/lib/c/include/types/inetping.h

    r408424e rc42f50d  
    11/*
    2  * Copyright (c) 2013 Martin Decky
     2 * Copyright (c) 2013 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3030 * @{
    3131 */
    32 /** @file
     32/**
     33 * @file
     34 * @brief
    3335 */
    3436
    35 #ifndef LIBC_INET_INETPING6_H_
    36 #define LIBC_INET_INETPING6_H_
     37#ifndef LIBC_TYPES_INETPING_H_
     38#define LIBC_TYPES_INETPING_H_
    3739
    38 #include <inet/inet.h>
     40#include <inet/addr.h>
    3941#include <sys/types.h>
    4042
    4143typedef struct {
    42         addr128_t src;
    43         addr128_t dest;
     44        inet_addr_t src;
     45        inet_addr_t dest;
    4446        uint16_t seq_no;
    4547        void *data;
    4648        size_t size;
    47 } inetping6_sdu_t;
    48 
    49 typedef struct inetping6_ev_ops {
    50         int (*recv)(inetping6_sdu_t *);
    51 } inetping6_ev_ops_t;
    52 
    53 extern int inetping6_init(inetping6_ev_ops_t *);
    54 extern int inetping6_send(inetping6_sdu_t *);
    55 extern int inetping6_get_srcaddr(addr128_t, addr128_t);
     49} inetping_sdu_t;
    5650
    5751#endif
Note: See TracChangeset for help on using the changeset viewer.