-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ktls #4482
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
Open
kostikbel
wants to merge
5
commits into
rust-lang:main
Choose a base branch
from
kostikbel:ktls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ktls #4482
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f96b8db
libc-test/build.rs: add netinet/in_pcb.h to the list of FreeBSD headers
kostikbel 6eec81b
FreeBSD: add xinpgen and related types definitions
kostikbel f518759
FreeBSD: add in_conninfo definition
kostikbel 8990852
FreeBSD: add xktls_session definition
kostikbel 7e42c78
FreeBSD: skip checking of xktls_session* structs on FreeBSD 14.x and …
kostikbel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,6 +11,9 @@ pub type fixpt_t = __fixpt_t; | |||||
pub type __lwpid_t = i32; | ||||||
pub type lwpid_t = __lwpid_t; | ||||||
pub type blksize_t = i32; | ||||||
pub type ksize_t = u64; | ||||||
pub type inp_gen_t = u64; | ||||||
pub type so_gen_t = u64; | ||||||
pub type clockid_t = c_int; | ||||||
pub type sem_t = _sem; | ||||||
pub type timer_t = *mut __c_anonymous__timer; | ||||||
|
@@ -1720,6 +1723,72 @@ s_no_extra_traits! { | |||||
pub uc_flags: c_int, | ||||||
__spare__: [c_int; 4], | ||||||
} | ||||||
|
||||||
pub struct xinpgen { | ||||||
pub xig_len: ksize_t, | ||||||
pub xig_count: u32, | ||||||
pub _xig_spare32: u32, | ||||||
pub xig_gen: inp_gen_t, | ||||||
pub xig_sogen: so_gen_t, | ||||||
pub _xig_spare64: [u64; 4], | ||||||
} | ||||||
|
||||||
pub struct in_addr_4in6 { | ||||||
pub ia46_pad32: [u32; 3], | ||||||
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.
Suggested change
|
||||||
pub ia46_addr4: crate::in_addr, | ||||||
} | ||||||
|
||||||
pub union in_dependaddr { | ||||||
pub id46_addr: crate::in_addr_4in6, | ||||||
pub id6_addr: crate::in6_addr, | ||||||
} | ||||||
|
||||||
pub struct in_endpoints { | ||||||
pub ie_fport: u16, | ||||||
pub ie_lport: u16, | ||||||
pub ie_dependfaddr: crate::in_dependaddr, | ||||||
pub ie_dependladdr: crate::in_dependaddr, | ||||||
pub ie6_zoneid: u32, | ||||||
} | ||||||
|
||||||
pub struct in_conninfo { | ||||||
pub inc_flags: u8, | ||||||
pub inc_len: u8, | ||||||
pub inc_fibnum: u16, | ||||||
pub inc_ie: crate::in_endpoints, | ||||||
} | ||||||
|
||||||
pub struct xktls_session_onedir { | ||||||
pub gennum: u64, | ||||||
pub rsrv1: [u64; 8], | ||||||
pub rsrv2: [u32; 8], | ||||||
pub iv: [u8; 32], | ||||||
pub cipher_algorithm: i32, | ||||||
pub auth_algorithm: i32, | ||||||
pub cipher_key_len: u16, | ||||||
pub iv_len: u16, | ||||||
pub auth_key_len: u16, | ||||||
pub max_frame_len: u16, | ||||||
pub tls_vmajor: u8, | ||||||
pub tls_vminor: u8, | ||||||
pub tls_hlen: u8, | ||||||
pub tls_tlen: u8, | ||||||
pub tls_bs: u8, | ||||||
pub flags: u8, | ||||||
pub drv_st_len: u16, | ||||||
pub ifnet: [u8; 16], | ||||||
} | ||||||
|
||||||
pub struct xktls_session { | ||||||
pub tsz: u32, | ||||||
pub fsz: u32, | ||||||
pub inp_gencnt: u64, | ||||||
pub so_pcb: kvaddr_t, | ||||||
pub coninf: crate::in_conninfo, | ||||||
pub rx_vlan_id: c_short, | ||||||
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.
Suggested change
|
||||||
pub rcv: crate::xktls_session_onedir, | ||||||
pub snd: crate::xktls_session_onedir, | ||||||
} | ||||||
} | ||||||
|
||||||
cfg_if! { | ||||||
|
@@ -4590,6 +4659,10 @@ pub const RB_POWERCYCLE: c_int = 0x400000; | |||||
pub const RB_PROBE: c_int = 0x10000000; | ||||||
pub const RB_MULTIPLE: c_int = 0x20000000; | ||||||
|
||||||
// netinet/in_pcb.h | ||||||
pub const INC_ISIPV6: c_uchar = 0x01; | ||||||
pub const INC_IPV6MINMTU: c_uchar = 0x02; | ||||||
|
||||||
// sys/time.h | ||||||
pub const CLOCK_BOOTTIME: crate::clockid_t = crate::CLOCK_UPTIME; | ||||||
pub const CLOCK_REALTIME_COARSE: crate::clockid_t = crate::CLOCK_REALTIME_FAST; | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The convention used elsewhere in libc is to make spare and padding fields private. The forces consumers to initialize with
mem::zeroed
, but it also makes it easier for future versions of libc to replace those spare fields with no backwards-compatibility problems.