Skip to content
Snippets Groups Projects
Commit 98d4f189 authored by Bob Lantz's avatar Bob Lantz
Browse files

Initial commit - first development version of Mininet

parents
No related branches found
No related tags found
No related merge requests found
cleanup 0 → 100755
#!/bin/bash
echo "Removing all links of the pattern foo-ethX"
for f in `ip link show | egrep -o '(\w+-eth\w+)' ` ; do
cmd="ip link del $f"
echo $smd
$cmd
done
echo "Removing excess controllers/ofprotocols/ofdatapaths/pings"
killall -9 controller ofprotocol ofdatapath ping 2> /dev/null
echo "Removing vconn junk in /tmp"
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
This diff is collapsed.
netns.c 0 → 100644
/* netns: run a command in a network namespace.
* Simplified from netunshare.c on lxc.sf.net
*/
#include <stdio.h>
#include <sched.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
if (unshare(CLONE_NEWNET) == -1) {
perror("unshare");
return 1;
}
if (argc) {
execve(argv[1], &argv[1], __environ);
perror("execve");
return 1;
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment