Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
github.com/AkihiroSuda/vde_vmnet -> github.com/lima-vm/vde_vmnet
Browse files Browse the repository at this point in the history
Fix #9

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Aug 2, 2021
1 parent e7f3069 commit 14de71f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install
run: sudo make install
- name: Print launchd status (shared mode)
run: launchctl print system/io.github.AkihiroSuda.vde_vmnet.plist
run: launchctl print system/io.github.lima-vm.vde_vmnet.plist
- name: Install test dependencies
run: brew install qemu bash coreutils
- name: Test (shared mode)
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ install.bin: vde_vmnet

install.launchd.plist: launchd/*.plist
install launchd/io.github.virtualsquare.vde-2.vde_switch.plist "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.plist"
install launchd/io.github.AkihiroSuda.vde_vmnet.plist "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.plist"
install launchd/io.github.lima-vm.vde_vmnet.plist "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.plist"
ifneq ($(BRIDGED),)
sed -e "s/en0/$(BRIDGED)/g" launchd/io.github.virtualsquare.vde-2.vde_switch.bridged.en0.plist > "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.bridged.$(BRIDGED).plist"
sed -e "s/en0/$(BRIDGED)/g" launchd/io.github.AkihiroSuda.vde_vmnet.bridged.en0.plist > "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.bridged.$(BRIDGED).plist"
sed -e "s/en0/$(BRIDGED)/g" launchd/io.github.lima-vm.vde_vmnet.bridged.en0.plist > "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.bridged.$(BRIDGED).plist"
endif

install.launchd: install.launchd.plist
launchctl load -w "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.plist"
launchctl load -w "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.plist"
launchctl load -w "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.plist"
ifneq ($(BRIDGED),)
launchctl load -w "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.bridged.$(BRIDGED).plist"
launchctl load -w "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.bridged.$(BRIDGED).plist"
launchctl load -w "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.bridged.$(BRIDGED).plist"
endif

install: install.bin install.launchd
Expand All @@ -47,18 +47,18 @@ uninstall.bin:

.PHONY: uninstall.launchd
uninstall.launchd:
launchctl unload -w "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.plist"
launchctl unload -w "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.plist"
launchctl unload -w "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.plist"
ifneq ($(BRIDGED),)
launchctl unload -w "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.bridged.$(BRIDGED).plist"
launchctl unload -w "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.bridged.$(BRIDGED).plist"
launchctl unload -w "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.bridged.$(BRIDGED).plist"
endif

uninstall.launchd.plist: uninstall.launchd
rm -f "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.plist"
rm -f "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.plist"
rm -f "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.plist"
ifneq ($(BRIDGED),)
rm -f "$(DESTDIR)/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.bridged.$(BRIDGED).plist"
rm -f "$(DESTDIR)/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.bridged.$(BRIDGED).plist"
rm -f "$(DESTDIR)/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.bridged.$(BRIDGED).plist"
endif

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sudo make install
The following files will be installed:
- `/usr/local/bin/vde_vmnet`
- `/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.plist`
- `/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.plist`
- `/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.plist`
- Configured to use `192.168.105.0/24`. Modifiy the file if it conflicts with your local network.

See ["Testing without launchd"](#testing-without-launchd) if you don't prefer to use launchd.
Expand Down Expand Up @@ -54,7 +54,7 @@ Run `sudo make install BRIDGED=en0`.

The following additional files will be installed:
- `/Library/LaunchDaemons/io.github.virtualsquare.vde-2.vde_switch.bridged.en0.plist`
- `/Library/LaunchDaemons/io.github.AkihiroSuda.vde_vmnet.bridged.en0.plist`
- `/Library/LaunchDaemons/io.github.lima-vm.vde_vmnet.bridged.en0.plist`

Use `/var/run/vde.bridged.en0.ctl` as the VDE socket path.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.github.AkihiroSuda.vde_vmnet.bridged.en0.plist</string>
<string>io.github.lima-vm.vde_vmnet.bridged.en0.plist</string>
<key>Program</key>
<string>/usr/local/bin/vde_vmnet</string>
<key>ProgramArguments</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.github.AkihiroSuda.vde_vmnet.plist</string>
<string>io.github.lima-vm.vde_vmnet.plist</string>
<key>Program</key>
<string>/usr/local/bin/vde_vmnet</string>
<key>ProgramArguments</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- make install: no by default -->
<plist version="1.0">
<dict>
<!-- vde_switch itself is maintained at github.com/virtualsquare/vde-2 , but this plist file is maintained at github.com/AkihiroSuda/vde_vmnet -->
<!-- vde_switch itself is maintained at github.com/virtualsquare/vde-2 , but this plist file is maintained at github.com/lima-vm/vde_vmnet -->
<key>Label</key>
<string>io.github.virtualsquare.vde-2.vde_switch.bridged.en0.plist</string>
<key>Program</key>
Expand Down
2 changes: 1 addition & 1 deletion launchd/io.github.virtualsquare.vde-2.vde_switch.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- make install: yes -->
<plist version="1.0">
<dict>
<!-- vde_switch itself is maintained at github.com/virtualsquare/vde-2 , but this plist file is maintained at github.com/AkihiroSuda/vde_vmnet -->
<!-- vde_switch itself is maintained at github.com/virtualsquare/vde-2 , but this plist file is maintained at github.com/lima-vm/vde_vmnet -->
<key>Label</key>
<string>io.github.virtualsquare.vde-2.vde_switch.plist</string>
<key>Program</key>
Expand Down
8 changes: 4 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ static interface_ref start(VDECONN *vdeconn, struct cli_options *cliopt) {
xpc_dictionary_set_uuid(dict, vmnet_interface_id_key,
cliopt->vmnet_interface_id);

dispatch_queue_t q = dispatch_queue_create("com.example.vde_vmnet.start",
DISPATCH_QUEUE_SERIAL);
dispatch_queue_t q = dispatch_queue_create(
"io.github.lima-vm.vde_vmnet.start", DISPATCH_QUEUE_SERIAL);
dispatch_semaphore_t sem = dispatch_semaphore_create(0);

__block interface_ref iface;
Expand All @@ -202,7 +202,7 @@ static interface_ref start(VDECONN *vdeconn, struct cli_options *cliopt) {
}

dispatch_queue_t event_q = dispatch_queue_create(
"com.example.vde_vmnet.events", DISPATCH_QUEUE_SERIAL);
"io.github.lima-vm.vde_vmnet.events", DISPATCH_QUEUE_SERIAL);
vmnet_interface_set_event_callback(
iface, VMNET_INTERFACE_PACKETS_AVAILABLE, event_q,
^(interface_event_t __attribute__((unused)) x_event_id,
Expand All @@ -219,7 +219,7 @@ static void stop(interface_ref iface) {
if (iface == NULL) {
return;
}
dispatch_queue_t q = dispatch_queue_create("com.example.vde_vmnet.stop",
dispatch_queue_t q = dispatch_queue_create("io.github.lima-vm.vde_vmnet.stop",
DISPATCH_QUEUE_SERIAL);
dispatch_semaphore_t sem = dispatch_semaphore_create(0);
__block vmnet_return_t status;
Expand Down

0 comments on commit 14de71f

Please sign in to comment.