Changeset 5d1cb8a in mainline
- Timestamp:
- 2013-05-03T21:11:23Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4e716180
- Parents:
- 8fdb18e
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
r8fdb18e r5d1cb8a 166 166 $(USPACE_PATH)/app/dltest2/dltest2 \ 167 167 $(USPACE_PATH)/app/dload/dload \ 168 $(USPACE_PATH)/app/dnscfg/dnscfg \ 168 169 $(USPACE_PATH)/app/dnsres/dnsres \ 169 170 $(USPACE_PATH)/app/edit/edit \ -
uspace/Makefile
r8fdb18e r5d1cb8a 39 39 app/bnchmark \ 40 40 app/devctl \ 41 app/dnscfg \ 41 42 app/dnsres \ 42 43 app/edit \ -
uspace/srv/net/dnsrsrv/dnsrsrv.c
r8fdb18e r5d1cb8a 114 114 ipc_call_t *call) 115 115 { 116 // inet_addr_t remote;117 // uint8_t tos;118 // inet_addr_t local;119 // int rc;120 121 116 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_get_srvaddr_srv()"); 122 123 /* remote.ipv4 = IPC_GET_ARG1(*call); 124 tos = IPC_GET_ARG2(*call); 125 local.ipv4 = 0; 126 127 rc = inet_get_srcaddr(&remote, tos, &local);*/ 128 async_answer_1(callid, EOK, 0x01020304); 117 async_answer_1(callid, EOK, dns_server_addr.ipv4); 129 118 } 130 119 … … 132 121 ipc_call_t *call) 133 122 { 134 // inet_addr_t naddr;135 // int rc;136 137 123 log_msg(LOG_DEFAULT, LVL_DEBUG, "dnsr_set_srvaddr_srv()"); 138 124 139 // naddr.ipv4 = IPC_GET_ARG1(*call);125 dns_server_addr.ipv4 = IPC_GET_ARG1(*call); 140 126 141 /*rc = inet_get_srcaddr(&remote, tos, &local);*/142 127 async_answer_0(callid, EOK); 143 128 } … … 151 136 /* Accept the connection */ 152 137 async_answer_0(iid, EOK); 153 154 // inet_client_init(&client);155 138 156 139 while (true) { … … 179 162 } 180 163 } 181 182 // inet_client_fini(&client);183 164 } 184 165 -
uspace/srv/net/dnsrsrv/transport.c
r8fdb18e r5d1cb8a 49 49 50 50 #define RECV_BUF_SIZE 4096 51 #define DNS_SERVER_PORT 53 51 52 52 53 /** Request timeout (microseconds) */ … … 68 69 static fid_t recv_fid; 69 70 static int transport_fd = -1; 71 inet_addr_t dns_server_addr; 70 72 71 73 /** Outstanding requests */ … … 187 189 188 190 addr.sin_family = AF_INET; 189 addr.sin_port = htons( 53);190 addr.sin_addr.s_addr = h tonl((10 << 24) | (0 << 16) | (0 << 8) | 138);191 addr.sin_port = htons(DNS_SERVER_PORT); 192 addr.sin_addr.s_addr = host2uint32_t_be(dns_server_addr.ipv4); 191 193 192 194 rc = dns_message_encode(req, &req_data, &req_size); -
uspace/srv/net/dnsrsrv/transport.h
r8fdb18e r5d1cb8a 37 37 #define TRANSPORT_H 38 38 39 #include <inet/addr.h> 39 40 #include "dns_type.h" 40 41 … … 43 44 extern int dns_request(dns_message_t *, dns_message_t **); 44 45 46 extern inet_addr_t dns_server_addr; 47 48 45 49 #endif 46 50
Note:
See TracChangeset
for help on using the changeset viewer.