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


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

File:
1 edited

Legend:

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

    r408424e rc42f50d  
    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.