Changeset a2e3ee6 in mainline for uspace/lib/c/generic/net


Ignore:
Timestamp:
2013-06-20T16:45:58Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
08bb73b
Parents:
19a4f73
Message:

use new network address infrastructure (towards IPv6 support)

Location:
uspace/lib/c/generic/net
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/net/inet.c

    r19a4f73 ra2e3ee6  
    3939#include <net/in6.h>
    4040#include <net/inet.h>
    41 
     41#include <inet/addr.h>
    4242#include <errno.h>
    4343#include <mem.h>
  • uspace/lib/c/generic/net/socket_client.c

    r19a4f73 ra2e3ee6  
    8787        /** Parent module service. */
    8888        services_t service;
     89        /** Socket family */
     90        int family;
    8991
    9092        /**
     
    395397        switch (domain) {
    396398        case PF_INET:
     399        case PF_INET6:
    397400                switch (type) {
    398401                case SOCK_STREAM:
     
    433436                break;
    434437
    435         case PF_INET6:
    436438        default:
    437439                return EPFNOSUPPORT;
     
    447449
    448450        memset(socket, 0, sizeof(*socket));
     451        socket->family = domain;
    449452        fibril_rwlock_write_lock(&socket_globals.lock);
    450453
  • uspace/lib/c/generic/net/socket_parse.c

    r19a4f73 ra2e3ee6  
    7979int socket_parse_protocol_family(const char *name, int *pf)
    8080{
     81        if (str_lcmp(name, "PF_INET6", 8) == 0) {
     82                *pf = PF_INET6;
     83                return EOK;
     84        }
     85
    8186        if (str_lcmp(name, "PF_INET", 7) == 0) {
    8287                *pf = PF_INET;
    83                 return EOK;
    84         }
    85        
    86         if (str_lcmp(name, "PF_INET6", 8) == 0) {
    87                 *pf = PF_INET6;
    8888                return EOK;
    8989        }
Note: See TracChangeset for help on using the changeset viewer.