This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import socket | |
opt = 1 | |
for arg in sys.argv[1:]: | |
if arg == 'on': | |
opt = 1 | |
elif arg == 'off': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru usock-0.6.orig/linux/device_tap.c usock-0.6/linux/device_tap.c | |
--- usock-0.6.orig/linux/device_tap.c 2010-05-07 11:49:06.000000000 +0900 | |
+++ usock-0.6/linux/device_tap.c 2010-05-07 11:59:39.000000000 +0900 | |
@@ -16,13 +16,18 @@ | |
#include <sys/ioctl.h> | |
#include <sys/select.h> | |
#include <sys/socket.h> | |
+#ifdef linux | |
#include <linux/if.h> | |
#include <linux/if_tun.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* requirement | |
- uIP 1.0, http://www.sics.se/~adam/uip/index.php/Main_Page | |
- TUNTAP driver for Mac OS X, http://tuntaposx.sourceforge.net/ | |
---- | |
* patch for uIP 1.0 | |
diff -ru uip-1.0.orig/uip/Makefile.include uip-1.0/uip/Makefile.include | |
--- uip-1.0.orig/uip/Makefile.include 2006-06-12 17:22:48.000000000 +0900 | |
+++ uip-1.0/uip/Makefile.include 2010-05-07 10:43:33.000000000 +0900 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 192.168.0.1: tftpd | |
# 192.168.0.2: Plan 9 @ VMWare Fusion | |
# 192.168.0.3: SheevaPlug | |
Marvell>> ping 192.168.0.1 | |
Using egiga0 device | |
host 192.168.0.1 is alive | |
Marvell>> tftp 0x800000 9plug | |
Using egiga0 device | |
TFTP from server 192.168.0.1; our IP address is 192.168.0.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 192.168.0.1: tftpd | |
# 192.168.0.2: Plan 9 @ VMWare Fusion | |
# 192.168.0.3: SheevaPlug | |
Marvell>> ping 192.168.0.1 | |
Using egiga0 device | |
host 192.168.0.1 is alive | |
Marvell>> tftp 0x800000 9plug | |
Using egiga0 device | |
TFTP from server 192.168.0.1; our IP address is 192.168.0.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \/ | __ _ _ ____ _____| | | | |
| |\/| |/ _` | '__\ \ / / _ \ | | | |
| | | | (_| | | \ V / __/ | | | |
|_| |_|\__,_|_| \_/ \___|_|_| | |
_ _ ____ _ | |
| | | | | __ ) ___ ___ | |_ | |
| | | |___| _ \ / _ \ / _ \| __| | |
| |_| |___| |_) | (_) | (_) | |_ | |
\___/ |____/ \___/ \___/ \__| | |
** MARVELL BOARD: SHEEVA PLUG LE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This program changes the permission of '/dev/null' to 06000. Is it right behavior? | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/mount.h> | |
int | |
main() | |
{ | |
if (mount("/dev/null", "/dev/console", "none", MS_BIND, 0)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reset IDE: | |
Marvell Serial ATA Adapter | |
Integrated Sata device found | |
Device 0: OK | |
Model: Hitachi HDP725050GLA360 Firm: GM4OA5CA Ser#: GEA534RV10 | |
BJEA | |
Type: Hard Disk | |
Supports 48-bit addressing | |
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/rc | |
clonefile=/net/ether0/clone | |
<[4] $clonefile { | |
netdir=`{basename -d $clonefile} ^ / ^ `{cat /fd/4} | |
echo connect -1 >$netdir/ctl || exit 'cannot connect' | |
cat $netdir/data | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Packet sniffer by using PF_PACKET. | |
# Copyright (c) 2010 oraccha | |
import sys | |
from socket import * | |
ETH_P_IP = 0x800 | |
s = socket(PF_PACKET, SOCK_RAW, ETH_P_IP) | |
s.bind(("eth1", ETH_P_IP)) |