Changeset 31e9fe0 in mainline
- Timestamp:
- 2013-04-23T22:05:01Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c55cbbf
- Parents:
- dc95342
- Files:
-
- 5 added
- 5 edited
- 10 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
rdc95342 r31e9fe0 112 112 $(USPACE_PATH)/srv/hid/remcons/remcons \ 113 113 $(USPACE_PATH)/srv/hid/isdv4_tablet/isdv4_tablet \ 114 $(USPACE_PATH)/srv/net/dnsr es/dnsres\114 $(USPACE_PATH)/srv/net/dnsrsrv/dnsrsrv \ 115 115 $(USPACE_PATH)/srv/net/ethip/ethip \ 116 116 $(USPACE_PATH)/srv/net/inetsrv/inetsrv \ … … 166 166 $(USPACE_PATH)/app/dltest2/dltest2 \ 167 167 $(USPACE_PATH)/app/dload/dload \ 168 $(USPACE_PATH)/app/dnsres/dnsres \ 168 169 $(USPACE_PATH)/app/edit/edit \ 169 170 $(USPACE_PATH)/app/inet/inet \ -
uspace/Makefile
rdc95342 r31e9fe0 39 39 app/bnchmark \ 40 40 app/devctl \ 41 app/dnsres \ 41 42 app/edit \ 42 43 app/getterm \ … … 82 83 srv/devman \ 83 84 srv/loader \ 84 srv/net/dnsr es\85 srv/net/dnsrsrv \ 85 86 srv/net/ethip \ 86 87 srv/net/inetsrv \ -
uspace/app/dnsres/dnsres.c
rdc95342 r31e9fe0 1 1 /* 2 * Copyright (c) 201 2Jiri Svoboda2 * Copyright (c) 2013 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 30 30 * @{ 31 31 */ 32 /** 33 * @file 32 /** @file DNS query utility. 34 33 */ 35 34 35 #include <errno.h> 36 #include <inet/dnsr.h> 36 37 #include <stdio.h> 37 38 #include <stdlib.h> 38 #include <errno.h>39 39 40 #include "dns_msg.h" 41 #include "dns_std.h" 42 #include "query.h" 40 #define NAME "dnsres" 43 41 44 #define NAME "dnsres" 42 static void print_syntax(void) 43 { 44 printf("syntax: " NAME " <host-name>\n"); 45 } 45 46 46 47 static int addr_format(inet_addr_t *addr, char **bufp) … … 60 61 int main(int argc, char *argv[]) 61 62 { 62 dns_host_info_t *hinfo;63 char *astr;64 63 int rc; 64 dnsr_hostinfo_t *hinfo; 65 char *saddr; 65 66 66 printf("%s: DNS Resolution Service\n", NAME); 67 rc = dns_name2host(argc < 2 ? "helenos.org" : argv[1], &hinfo); 68 printf("dns_name2host() -> rc = %d\n", rc); 67 rc = dnsr_init(); 68 if (rc != EOK) { 69 printf(NAME ": Failed connecting to DNS resolution service " 70 "(%d).\n", rc); 71 return 1; 72 } 69 73 70 if (rc == EOK) { 71 rc = addr_format(&hinfo->addr, &astr); 72 if (rc != EOK) { 73 dns_hostinfo_destroy(hinfo); 74 printf("Out of memory\n"); 75 return ENOMEM; 76 } 74 if (argc != 2) { 75 print_syntax(); 76 return 1; 77 } 77 78 78 printf("hostname: %s\n", hinfo->name);79 printf("IPv4 address: %s\n", astr);80 free(astr);81 dns_hostinfo_destroy(hinfo);79 rc = dnsr_name2host(argv[1], &hinfo); 80 if (rc != EOK) { 81 printf(NAME ": Error resolving '%s'.\n", argv[1]); 82 return 1; 82 83 } 84 85 rc = addr_format(&hinfo->addr, &saddr); 86 if (rc != EOK) { 87 dnsr_hostinfo_destroy(hinfo); 88 printf(NAME ": Out of memory.\n"); 89 return 1; 90 } 91 92 printf("Host name: %s address: %s\n", hinfo->name, saddr); 93 dnsr_hostinfo_destroy(hinfo); 94 free(saddr); 83 95 84 96 return 0; -
uspace/app/init/init.c
rdc95342 r31e9fe0 359 359 srv_start("/srv/tcp"); 360 360 srv_start("/srv/udp"); 361 srv_start("/srv/dnsrsrv"); 361 362 362 363 srv_start("/srv/clipboard"); -
uspace/lib/c/Makefile
rdc95342 r31e9fe0 74 74 generic/device/pci.c \ 75 75 generic/device/ahci.c \ 76 generic/dnsr.c \ 76 77 generic/dlfcn.c \ 77 78 generic/elf/elf_load.c \ -
uspace/lib/c/include/ipc/services.h
rdc95342 r31e9fe0 53 53 } services_t; 54 54 55 #define SERVICE_NAME_DNSR "net/dnsr" 55 56 #define SERVICE_NAME_INET "net/inet" 56 57 #define SERVICE_NAME_INETCFG "net/inetcfg" -
uspace/srv/net/dnsrsrv/Makefile
rdc95342 r31e9fe0 28 28 29 29 USPACE_PREFIX = ../../.. 30 BINARY = dnsr es30 BINARY = dnsrsrv 31 31 32 32 SOURCES = \ 33 33 dns_msg.c \ 34 dnsr es.c \34 dnsrsrv.c \ 35 35 query.c \ 36 36 transport.c -
uspace/srv/net/dnsrsrv/dns_type.h
rdc95342 r31e9fe0 105 105 } dns_host_info_t; 106 106 107 typedef struct { 108 } dnsr_client_t; 109 107 110 #endif 108 111
Note:
See TracChangeset
for help on using the changeset viewer.