Changeset 4c14b88 in mainline for uspace/app/dnsres/dnsres.c


Ignore:
Timestamp:
2013-12-31T07:57:14Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b973dc
Parents:
6297465 (diff), 208b5f5 (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:

mainline changes

File:
1 edited

Legend:

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

    r6297465 r4c14b88  
    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.