Skip to content

Commit

Permalink
fixup: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Jul 24, 2024
1 parent 00cd05c commit c336c51
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ impl State {
/// # Safety
///
/// `sync_state.lan` and `sync_state.ext_lan` must set an address and port:
/// * If `sync_state.af_lan == PF_INET`, then `host.addr.pfa._v4addr` must be initialized.
/// * If `sync_state.af_lan == PF_INET6`, then `host.addr.pfa._v6addr` must be initialized.
/// * `host.xport.port` must be initialized.
/// * If `sync_state.af_lan == PF_INET`, then these fields must be initialized:
/// * `sync_state.lan.addr.pfa._v4addr`
/// * `sync_state.ext_lan.addr.pfa._v4addr`
/// * If `sync_state.af_lan == PF_INET6`, then these fields must be initialized:
/// * `sync_state.lan.addr.pfa._v6addr`
/// * `sync_state.ext_lan.addr.pfa._v6addr`
/// * `sync_state.lan.xport.port` must be initialized.
/// * `sync_state.ext_lan.xport.port` must be initialized.
pub(crate) unsafe fn new(sync_state: pfsync_state) -> State {
State { sync_state }
}
Expand Down

0 comments on commit c336c51

Please sign in to comment.