-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Network entry API #5049
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?
Network entry API #5049
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 | ||
|---|---|---|---|---|
|
|
@@ -206,6 +206,13 @@ s! { | |||
| pub s_proto: *mut c_char, | ||||
| } | ||||
|
|
||||
| pub struct netent { | ||||
| n_name: *mut c_char, | ||||
| n_aliases: *mut *mut c_char, | ||||
| n_addrtype: c_int, | ||||
| n_net: u32, | ||||
|
Comment on lines
+210
to
+213
Member
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. I think these should be |
||||
| } | ||||
|
|
||||
| pub struct protoent { | ||||
| pub p_name: *mut c_char, | ||||
| pub p_aliases: *mut *mut c_char, | ||||
|
|
@@ -1521,6 +1528,11 @@ extern "C" { | |||
| pub fn getservbyport(port: c_int, proto: *const c_char) -> *mut servent; | ||||
| pub fn getservent() -> *mut servent; | ||||
| pub fn setservent(stayopen: c_int); | ||||
| pub fn getnetent() -> *mut netent; | ||||
| pub fn getnetbyname(name: *const c_char) -> *mut netent; | ||||
| pub fn getnetbyaddr(net: u32, type_: c_int) -> *mut netent; | ||||
| pub fn setnetent(stayopen: c_int); | ||||
| pub fn endnetent(); | ||||
|
Member
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. I wonder if this had the same situation as Line 1173 in a3e451c
https://github.com/illumos/illumos-gate/blob/5425aa59e8fd3834b86390ed6d8a13586c918df9/usr/src/head/netdb.h#L288-L305 |
||||
| pub fn getprotobyname(name: *const c_char) -> *mut protoent; | ||||
| pub fn getprotobynumber(proto: c_int) -> *mut protoent; | ||||
| pub fn chroot(name: *const c_char) -> c_int; | ||||
|
|
||||
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.
You should also add
getnetbynameandgetnetbyaddr