Skip to content
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

Differentiate IP Crate for Windows and Nix #273

Merged
merged 4 commits into from
Aug 15, 2023
Merged

Differentiate IP Crate for Windows and Nix #273

merged 4 commits into from
Aug 15, 2023

Conversation

jabbate19
Copy link
Collaborator

What type of PR is this?

Add one of the following kinds:
/kind cleanup

/kind api-change
/kind eldritch-function

What this PR does / why we need it:

Limits use of the network_interface crate to windows only. Allows realm to be FreeBSD compatible.

Which issue(s) this PR fixes:

N/A

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #273 (1d3c521) into main (e604106) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
+ Coverage   74.16%   74.26%   +0.10%     
==========================================
  Files          89       89              
  Lines        5795     5818      +23     
==========================================
+ Hits         4298     4321      +23     
  Misses       1411     1411              
  Partials       86       86              
Files Changed Coverage Δ
implants/lib/eldritch/src/sys/get_ip_impl.rs 98.66% <100.00%> (+0.58%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jabbate19 jabbate19 requested a review from hulto August 15, 2023 02:07
@jabbate19 jabbate19 changed the title Differentiate for Windows and Nix Differentiate IP Crate for Windows and Nix Aug 15, 2023
Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thought and you'll have to make a similar change in imix to support BSD otherwise looks great 🙌

@@ -55,6 +66,27 @@ fn create_dict_from_interface(starlark_heap: &Heap, interface: NetInterface) ->
Ok(tmp_res)
}

#[cfg(not(target_os = "windows"))]
fn create_dict_from_interface(starlark_heap: &Heap, interface: NetworkInterface) -> Result<Dict>{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm could we Abstract this type out or just move the function to take the three params. Don't love having two separate dictionary functions.

@jabbate19 jabbate19 merged commit cd8d9d2 into main Aug 15, 2023
8 checks passed
@jabbate19 jabbate19 deleted the change_crate_ip branch August 15, 2023 03:38
hulto pushed a commit that referenced this pull request Sep 30, 2023
* Differentiate for Windows and Nix

* Conditional Deps

* Fix Cargo order
hulto pushed a commit that referenced this pull request Sep 30, 2023
* Differentiate for Windows and Nix

* Conditional Deps

* Fix Cargo order
hulto pushed a commit that referenced this pull request Oct 5, 2023
* Differentiate for Windows and Nix

* Conditional Deps

* Fix Cargo order
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
Differentiate IP Crate for Windows and Nix (#273)

* Differentiate for Windows and Nix

* Conditional Deps

* Fix Cargo order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants