-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add resolv #4618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add resolv #4618
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1263,6 +1263,11 @@ pub const PIPE_BUF: usize = 4096; | |
|
||
pub const SI_LOAD_SHIFT: c_uint = 16; | ||
|
||
// arpa/nameser.h | ||
pub const T_A: c_int = 1; | ||
pub const T_CNAME: c_int = 5; | ||
pub const C_IN: c_int = 1; | ||
|
||
// si_code values | ||
pub const SI_USER: c_int = 0; | ||
pub const SI_KERNEL: c_int = 0x80; | ||
|
@@ -2062,6 +2067,45 @@ extern "C" { | |
|
||
pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; | ||
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; | ||
|
||
// <resolv.h> | ||
#[allow(dead_code)] | ||
pub fn res_init() -> c_int; | ||
pub fn res_query( | ||
dname: *const c_char, | ||
class: c_int, | ||
kind: c_int, | ||
answer: *mut c_uchar, | ||
anslen: c_int, | ||
) -> c_int; | ||
pub fn res_search( | ||
dname: *const c_char, | ||
class: c_int, | ||
kind: c_int, | ||
answer: *mut c_uchar, | ||
anslen: c_int, | ||
) -> c_int; | ||
pub fn res_querydomain( | ||
name: *const c_char, | ||
domain: *const c_char, | ||
class: c_int, | ||
kind: c_int, | ||
answer: *mut c_uchar, | ||
anslen: c_int, | ||
) -> c_int; | ||
pub fn res_mkquery( | ||
op: c_int, | ||
dname: *const c_char, | ||
class: c_int, | ||
kind: c_int, | ||
data: *mut c_char, | ||
newrr: *const c_void, | ||
datalen: c_int, | ||
buf: *mut c_char, | ||
buflen: c_int, | ||
) -> c_int; | ||
Comment on lines
+2096
to
+2106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to match the definitions linked at #4611: those have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also few arguments misplacements see above my comment and on linux it should be linked to libresolv. |
||
pub fn res_send(msg: *const c_char, msglen: c_int, answer: *mut c_char, anslen: c_int) | ||
-> c_int; | ||
} | ||
|
||
// LFS64 extensions | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed