Changeset 0773396 in mainline for uspace/app/dnsres/dnsres.c


Ignore:
Timestamp:
2013-12-25T13:05:25Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc54126c
Parents:
f4a47e52 (diff), 6946f23 (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

File:
1 edited

Legend:

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

    rf4a47e52 r0773396  
    3636#include <inet/addr.h>
    3737#include <inet/dnsr.h>
    38 #include <net/socket_codes.h>
    3938#include <stdio.h>
    4039#include <stdlib.h>
     
    5453        }
    5554       
    56         uint16_t af;
     55        uint16_t ver;
    5756        char *hname;
    5857       
     
    6362                }
    6463               
    65                 af = AF_INET;
     64                ver = ip_v4;
    6665                hname = argv[2];
    6766        } else if (str_cmp(argv[1], "-6") == 0) {
     
    7170                }
    7271               
    73                 af = AF_INET6;
     72                ver = ip_v6;
    7473                hname = argv[2];
    7574        } else {
    76                 af = 0;
     75                ver = ip_any;
    7776                hname = argv[1];
    7877        }
    7978       
    8079        dnsr_hostinfo_t *hinfo;
    81         int rc = dnsr_name2host(hname, &hinfo, af);
     80        int rc = dnsr_name2host(hname, &hinfo, ver);
    8281        if (rc != EOK) {
    8382                printf("%s: Error resolving '%s'.\n", NAME, hname);
Note: See TracChangeset for help on using the changeset viewer.