Changeset e4554d4 in mainline


Ignore:
Timestamp:
2010-10-06T20:05:47Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88e127ee
Parents:
2687bdb
Message:

Move inet.[ch], in.h and in6.h to standard library.

Location:
uspace
Files:
2 added
2 deleted
26 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/netecho/netecho.c

    r2687bdb re4554d4  
    4343#include <err.h>
    4444
    45 #include <in.h>
    46 #include <in6.h>
    47 #include <inet.h>
     45#include <net/in.h>
     46#include <net/in6.h>
     47#include <net/inet.h>
    4848#include <socket.h>
    4949#include <socket_parse.h>
  • uspace/app/nettest1/nettest1.c

    r2687bdb re4554d4  
    4343#include <err.h>
    4444
    45 #include <in.h>
    46 #include <in6.h>
    47 #include <inet.h>
     45#include <net/in.h>
     46#include <net/in6.h>
     47#include <net/inet.h>
    4848#include <socket.h>
    4949#include <socket_parse.h>
  • uspace/app/nettest2/nettest2.c

    r2687bdb re4554d4  
    4343#include <err.h>
    4444
    45 #include <in.h>
    46 #include <in6.h>
    47 #include <inet.h>
     45#include <net/in.h>
     46#include <net/in6.h>
     47#include <net/inet.h>
    4848#include <socket.h>
    4949#include <socket_parse.h>
  • uspace/app/ping/ping.c

    r2687bdb re4554d4  
    4646
    4747#include <icmp_api.h>
    48 #include <in.h>
    49 #include <in6.h>
    50 #include <inet.h>
     48#include <net/in.h>
     49#include <net/in6.h>
     50#include <net/inet.h>
    5151#include <ip_codes.h>
    5252#include <socket_parse.h>
  • uspace/lib/c/Makefile

    r2687bdb re4554d4  
    9999        generic/vfs/vfs.c \
    100100        generic/vfs/canonify.c \
     101        generic/net/inet.c \
    101102        generic/stacktrace.c \
    102103        generic/arg_parse.c \
  • uspace/lib/c/include/net/in.h

    r2687bdb re4554d4  
    2727 */
    2828
    29 /** @addtogroup net
     29/** @addtogroup libc
    3030 *  @{
    3131 */
     
    3535 */
    3636
    37 #ifndef __NET_IN_H__
    38 #define __NET_IN_H__
     37#ifndef LIBC_IN_H_
     38#define LIBC_IN_H_
    3939
     40#include <net/inet.h>
     41#include <net/ip_protocols.h>
    4042#include <sys/types.h>
    4143
    42 #include <net/ip_protocols.h>
    43 #include <inet.h>
    44 
    45 /** INET string address maximum length.
    46  */
     44/** INET string address maximum length. */
    4745#define INET_ADDRSTRLEN         (4 * 3 + 3 + 1)
    4846
    4947/** Type definition of the INET address.
    50  *  @see in_addr
     48 * @see in_addr
    5149 */
    5250typedef struct in_addr          in_addr_t;
    5351
    5452/** Type definition of the INET socket address.
    55  *  @see sockaddr_in
     53 * @see sockaddr_in
    5654 */
    5755typedef struct sockaddr_in      sockaddr_in_t;
    5856
    59 /** INET address.
    60  */
    61 struct in_addr{
    62         /** 4 byte IP address.
    63          */
     57/** INET address. */
     58struct in_addr {
     59        /** 4 byte IP address. */
    6460        uint32_t s_addr;
    6561};
    6662
    6763/** INET socket address.
    68  *  @see sockaddr
     64 * @see sockaddr
    6965 */
    70 struct sockaddr_in{
    71         /** Address family.
    72          *  Should be AF_INET.
    73          */
     66struct sockaddr_in {
     67        /** Address family. Should be AF_INET. */
    7468        uint16_t sin_family;
    75         /** Port number.
    76          */
     69        /** Port number. */
    7770        uint16_t sin_port;
    78         /** Internet address.
    79          */
     71        /** Internet address. */
    8072        struct in_addr sin_addr;
    81         /** Padding to meet the sockaddr size.
    82          */
     73        /** Padding to meet the sockaddr size. */
    8374        uint8_t sin_zero[8];
    8475};
  • uspace/lib/c/include/net/in6.h

    r2687bdb re4554d4  
    2727 */
    2828
    29 /** @addtogroup net
     29/** @addtogroup libc
    3030 *  @{
    3131 */
     
    3535 */
    3636
    37 #ifndef __NET_IN6_H__
    38 #define __NET_IN6_H__
     37#ifndef LIBC_IN6_H_
     38#define LIBC_IN6_H_
    3939
     40#include <net/inet.h>
     41#include <net/ip_protocols.h>
    4042#include <sys/types.h>
    4143
    42 #include <net/ip_protocols.h>
    43 #include <inet.h>
    44 
    45 /** INET6 string address maximum length.
    46  */
     44/** INET6 string address maximum length. */
    4745#define INET6_ADDRSTRLEN        (8 * 4 + 7 + 1)
    4846
    4947/** Type definition of the INET6 address.
    50  *  @see in6_addr
     48 * @see in6_addr
    5149 */
    5250typedef struct in6_addr in6_addr_t;
    5351
    5452/** Type definition of the INET6 socket address.
    55  *  @see sockaddr_in6
     53 * @see sockaddr_in6
    5654 */
    5755typedef struct sockaddr_in6     sockaddr_in6_t;
    5856
    59 /** INET6 address.
    60  */
    61 struct in6_addr{
    62         /** 16 byte IPv6 address.
    63          */
     57/** INET6 address. */
     58struct in6_addr {
     59        /** 16 byte IPv6 address. */
    6460        unsigned char s6_addr[16];
    6561};
    6662
    6763/** INET6 socket address.
    68  *  @see sockaddr
     64 * @see sockaddr
    6965 */
    70 struct sockaddr_in6{
    71         /** Address family.
    72          *  Should be AF_INET6.
    73          */
     66struct sockaddr_in6 {
     67        /** Address family. Should be AF_INET6. */
    7468        uint16_t sin6_family;
    75         /** Port number.
    76          */
     69        /** Port number. */
    7770        uint16_t sin6_port;
    78         /** IPv6 flow information.
    79          */
     71        /** IPv6 flow information. */
    8072        uint32_t sin6_flowinfo;
    81         /** IPv6 address.
    82          */
     73        /** IPv6 address. */
    8374        struct in6_addr sin6_addr;
    84         /** Scope identifier.
    85          */
     75        /** Scope identifier. */
    8676        uint32_t sin6_scope_id;
    8777};
  • uspace/lib/net/il/ip_remote.c

    r2687bdb re4554d4  
    4545#include <net_modules.h>
    4646#include <net_device.h>
    47 #include <inet.h>
     47#include <net/inet.h>
    4848#include <ip_interface.h>
    4949#include <packet/packet_client.h>
  • uspace/lib/net/include/icmp_header.h

    r2687bdb re4554d4  
    4141#include <sys/types.h>
    4242
    43 #include <in.h>
     43#include <net/in.h>
    4444#include <icmp_codes.h>
    4545
  • uspace/lib/net/include/icmp_interface.h

    r2687bdb re4554d4  
    4040#include <adt/measured_strings.h>
    4141#include <packet/packet.h>
    42 #include <inet.h>
     42#include <net/inet.h>
    4343#include <ip_codes.h>
    4444#include <icmp_codes.h>
  • uspace/lib/net/include/ip_interface.h

    r2687bdb re4554d4  
    4141#include <packet/packet.h>
    4242
    43 #include <in.h>
     43#include <net/in.h>
    4444#include <ip_codes.h>
    4545
  • uspace/lib/net/include/ip_local.h

    r2687bdb re4554d4  
    3838
    3939#include <ip_codes.h>
    40 #include <inet.h>
    41 #include <in.h>
     40#include <net/inet.h>
     41#include <net/in.h>
    4242#include <socket.h>
    4343
  • uspace/lib/net/include/ip_messages.h

    r2687bdb re4554d4  
    4242#include <ipc/net.h>
    4343
    44 #include <in.h>
     44#include <net/in.h>
    4545#include <ip_codes.h>
    4646
  • uspace/lib/net/include/ip_remote.h

    r2687bdb re4554d4  
    3838
    3939#include <ip_codes.h>
    40 #include <inet.h>
    41 #include <in.h>
     40#include <net/inet.h>
     41#include <net/in.h>
    4242#include <socket.h>
    4343
  • uspace/lib/net/include/tl_common.h

    r2687bdb re4554d4  
    4242#include <packet/packet.h>
    4343#include <net_device.h>
    44 #include <inet.h>
     44#include <net/inet.h>
    4545
    4646/** Device packet dimensions.
  • uspace/lib/net/tl/tl_common.c

    r2687bdb re4554d4  
    3737
    3838#include <net/socket_codes.h>
     39#include <net/in.h>
     40#include <net/in6.h>
     41#include <net/inet.h>
    3942#include <async.h>
    4043#include <ipc/services.h>
     
    4750#include <net_device.h>
    4851#include <icmp_interface.h>
    49 #include <in.h>
    50 #include <in6.h>
    51 #include <inet.h>
    5252#include <ip_local.h>
    5353#include <ip_remote.h>
  • uspace/lib/socket/Makefile

    r2687bdb re4554d4  
    3636        generic/socket_core.c \
    3737        generic/socket_parse.c \
    38         generic/inet.c \
    3938        generic/net_modules.c \
    4039        generic/icmp_common.c \
  • uspace/lib/socket/generic/icmp_api.c

    r2687bdb re4554d4  
    3737
    3838#include <net/socket_codes.h>
     39#include <net/inet.h>
    3940#include <async.h>
    4041
     
    4647#include <net_modules.h>
    4748#include <icmp_api.h>
    48 #include <inet.h>
    4949#include <ip_codes.h>
    5050#include <icmp_messages.h>
  • uspace/lib/socket/generic/socket_client.c

    r2687bdb re4554d4  
    4848
    4949#include <net_modules.h>
    50 #include <in.h>
     50#include <net/in.h>
    5151#include <socket.h>
    5252#include <adt/dynamic_fifo.h>
  • uspace/lib/socket/generic/socket_core.c

    r2687bdb re4554d4  
    3636
    3737#include <net/socket_codes.h>
     38#include <net/in.h>
     39#include <net/inet.h>
    3840
    3941#include <stdint.h>
     
    4244#include <err.h>
    4345
    44 #include <in.h>
    45 #include <inet.h>
    4646#include <adt/dynamic_fifo.h>
    4747#include <adt/int_map.h>
  • uspace/lib/socket/include/icmp_api.h

    r2687bdb re4554d4  
    3939
    4040#include <net/socket_codes.h>
     41#include <net/inet.h>
    4142#include <sys/types.h>
    4243
     
    4445#include <adt/measured_strings.h>
    4546#include <packet/packet.h>
    46 #include <inet.h>
    4747#include <ip_codes.h>
    4848#include <icmp_codes.h>
  • uspace/lib/socket/include/socket.h

    r2687bdb re4554d4  
    4141
    4242#include <net/socket_codes.h>
     43#include <net/in.h>
     44#include <net/in6.h>
     45#include <net/inet.h>
     46#include <errno.h>
    4347#include <byteorder.h>
    44 
    45 #include <in.h>
    46 #include <in6.h>
    47 #include <inet.h>
    48 #include <errno.h>
    4948
    5049/** @name Socket application programming interface
  • uspace/lib/socket/include/socket_core.h

    r2687bdb re4554d4  
    4040#include <sys/types.h>
    4141
    42 #include <in.h>
     42#include <net/in.h>
    4343#include <net_device.h>
    4444#include <adt/generic_char_map.h>
  • uspace/srv/net/il/ip/ip.c

    r2687bdb re4554d4  
    4848
    4949#include <net/socket_codes.h>
     50#include <net/in.h>
     51#include <net/in6.h>
     52#include <net/inet.h>
    5053
    5154#include <net_messages.h>
     
    5861#include <icmp_interface.h>
    5962#include <il_interface.h>
    60 #include <in.h>
    61 #include <in6.h>
    62 #include <inet.h>
    6363#include <ip_client.h>
    6464#include <ip_interface.h>
  • uspace/srv/net/il/ip/ip.h

    r2687bdb re4554d4  
    4343
    4444#include <net_device.h>
    45 #include <inet.h>
     45#include <net/inet.h>
    4646#include <ip_interface.h>
    4747#include <adt/int_map.h>
  • uspace/srv/net/tl/icmp/icmp.c

    r2687bdb re4554d4  
    5252#include <net/socket_codes.h>
    5353#include <net/ip_protocols.h>
     54#include <net/inet.h>
    5455
    5556#include <net_messages.h>
     
    6465#include <icmp_interface.h>
    6566#include <il_interface.h>
    66 #include <inet.h>
    6767#include <ip_client.h>
    6868#include <ip_interface.h>
  • uspace/srv/net/tl/tcp/tcp.c

    r2687bdb re4554d4  
    5050#include <net/socket_codes.h>
    5151#include <net/ip_protocols.h>
     52#include <net/in.h>
     53#include <net/in6.h>
     54#include <net/inet.h>
    5255
    5356#include <net_messages.h>
     
    5760#include <packet_remote.h>
    5861#include <net_checksum.h>
    59 #include <in.h>
    60 #include <in6.h>
    61 #include <inet.h>
    6262#include <ip_client.h>
    6363#include <ip_interface.h>
  • uspace/srv/net/tl/udp/udp.c

    r2687bdb re4554d4  
    4747#include <net/socket_codes.h>
    4848#include <net/ip_protocols.h>
     49#include <net/in.h>
     50#include <net/in6.h>
     51#include <net/inet.h>
    4952
    5053#include <net_messages.h>
     
    5457#include <packet_remote.h>
    5558#include <net_checksum.h>
    56 #include <in.h>
    57 #include <in6.h>
    58 #include <inet.h>
    5959#include <ip_client.h>
    6060#include <ip_interface.h>
Note: See TracChangeset for help on using the changeset viewer.