Changeset 141a20d in mainline for uspace/srv/net/dnsres/transport.c
- Timestamp:
- 2012-08-13T10:40:17Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1e2df13
- Parents:
- e5e73af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dnsres/transport.c
re5e73af r141a20d 52 52 size_t req_size; 53 53 struct sockaddr_in addr; 54 struct sockaddr_in laddr; 54 55 int fd; 55 56 56 57 addr.sin_family = AF_INET; 57 58 addr.sin_port = htons(53); 58 addr.sin_addr.s_addr = htonl((192 << 24) | (168 << 16) | (0 << 8) | 1); 59 addr.sin_addr.s_addr = htonl((10 << 24) | (0 << 16) | (0 << 8) | 1); 60 61 laddr.sin_family = AF_INET; 62 laddr.sin_port = htons(12345); 63 laddr.sin_addr.s_addr = INADDR_ANY; 59 64 60 65 req_data = NULL; … … 71 76 } 72 77 78 rc = bind(fd, (struct sockaddr *)&laddr, sizeof(laddr)); 79 if (rc != EOK) 80 goto error; 81 73 82 printf("fd=%d req_data=%p, req_size=%zu\n", fd, req_data, req_size); 74 83 rc = sendto(fd, req_data, req_size, 0, (struct sockaddr *)&addr, … … 76 85 if (rc != EOK) 77 86 goto error; 87 88 closesocket(fd); 89 free(req_data); 78 90 79 91 resp = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.