Last change
on this file since 413 was 398, checked in by coas-nagasima, 5 years ago |
mbedTLS版Azure IoT Hub接続サンプルのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
390 bytes
|
Rev | Line | |
---|
[398] | 1 | #include <resolv.h>
|
---|
| 2 | #include <string.h>
|
---|
| 3 |
|
---|
| 4 | int res_querydomain(const char *name, const char *domain, int class, int type, unsigned char *dest, int len)
|
---|
| 5 | {
|
---|
| 6 | char tmp[255];
|
---|
| 7 | size_t nl = strnlen(name, 255);
|
---|
| 8 | size_t dl = strnlen(domain, 255);
|
---|
| 9 | if (nl+dl+1 > 254) return -1;
|
---|
| 10 | memcpy(tmp, name, nl);
|
---|
| 11 | tmp[nl] = '.';
|
---|
| 12 | memcpy(tmp+nl+1, domain, dl+1);
|
---|
| 13 | return res_query(tmp, class, type, dest, len);
|
---|
| 14 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.