mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
introduce HERMIT_CAPTURE_NET to capture the network traffic
This commit is contained in:
parent
182999e0b7
commit
d18a6a72a5
2 changed files with 14 additions and 6 deletions
|
@ -153,6 +153,8 @@ For network support, you have to link the Go application with the flag `-lnetgo`
|
|||
2. If Qemu is started by our proxy and the environment variable `HERMIT_KVM` is set to `0`, the virtual machine will be not accelerated by KVM.
|
||||
In this case, the configuration flag `--with-mtune=name` should be avoided.
|
||||
With the environment variable `HERMIT_APP_PORT`, an additional port can be open to establish an TCP/IP connection with your application.
|
||||
3. By setting the environment variable `HERMIT_VERBOSE` to `1`, the proxy prints at termination the kernel log messages onto the screen.
|
||||
3. By setting the environment variable `HERMIT_VERBOSE` to `1`, the proxy prints at termination the kernel log messages onto the screen.
|
||||
4. If `HERMIT_DEBUG` is set to `1`, Qemu will establish an gdbserver, which will be listen port 1234.
|
||||
Afterwards you are able debug HermitCore applications remotely.
|
||||
5. By setting the environment variable `HERMIT_CAPTURE_NET' to `1` and `HERMIT_ISLE` to `qemu`, Qemu captures the network traffic and
|
||||
creates the trace file *qemu-vlan0.pcap*. For instance with [Wireshark](https://www.wireshark.org) you are able to analyze the file.
|
||||
|
|
|
@ -393,6 +393,17 @@ static int init_qemu(char *path)
|
|||
qemu_argv[i] = "-s";
|
||||
}
|
||||
|
||||
str = getenv("HERMIT_CAPTURE_NET");
|
||||
if (str && (strcmp(str, "0") != 0))
|
||||
{
|
||||
for(i=0; qemu_argv[i] != NULL; i++)
|
||||
;
|
||||
|
||||
// add flags to capture the network traffic
|
||||
qemu_argv[i] = "-net";
|
||||
qemu_argv[i+1] = "dump";
|
||||
}
|
||||
|
||||
str = getenv("HERMIT_VERBOSE");
|
||||
if (str && (strcmp(str, "0") != 0))
|
||||
{
|
||||
|
@ -401,11 +412,6 @@ static int init_qemu(char *path)
|
|||
for(i=0; qemu_argv[i] != NULL; i++)
|
||||
printf("%s ", qemu_argv[i]);
|
||||
|
||||
// add flags to create dump of the network traffic
|
||||
//qemu_argv[i] = "-net";
|
||||
//qemu_argv[i+1] = "dump";
|
||||
//printf("%s %s\n", qemu_argv[i], qemu_argv[i+1]);
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue