FreeBSD
# ifconfig wlan0 create wlandev ath0 # ifconfig wlan0 channel 4 ssid hoge authmode shared \ wepmode on wepkey hogehogehogeh deftxkey 1 up
# ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:11:22:33:44:55
media: IEEE 802.11 Wireless Ethernet DS/1Mbps mode 11g
status: associated
ssid hoge channel 4 (2427 Mhz 11g) bssid 33:44:55:66:77:88
regdomain JAPAN country JP indoor ecm authmode SHARED privacy ON
deftxkey 1 wepkey 1:104-bit txpower 16 bmiss 7 scanvalid 60 bgscan
bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
wme burst# ifconfig wlan0 192.168.2.1 netmask 0xffffff00 # ping 192.168.2.254 PING 192.168.2.254 (192.168.2.254): 56 data bytes 64 bytes from 192.168.2.254: icmp_seq=0 ttl=127 time=3.662 ms 64 bytes from 192.168.2.254: icmp_seq=1 ttl=127 time=0.689 ms
# ifconfig wlan0 destory # ifconfig wlan0 create wlandev ath0 wlanmode hostap # ifconfig wlan0 channel 4 ssid hoge authmode shared \ wepmode on wepkey hogehogehogeh deftxkey 1 up
# ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 11:22:33:44:55:66
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid hoge channel 4 (2427 Mhz 11g) bssid 22:33:44:55:66:77
regdomain JAPAN country JP indoor ecm authmode SHARED privacy ON
deftxkey 1 wepkey 1:104-bit txpower 16 scanvalid 60 protmode CTS wme
burst ff dtimperiod 1 -dfs# ifconfig bridge0 create addm wlan0 addm fxp0 up
# ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:11:22:33:44:55
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: fxp0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 2 priority 128 path cost 200000
member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 8 priority 128 path cost 370370hostapd_enable="YES"
内容調査中
pf_enable="YES" gateway_enable="YES"
ext_if="xl0" # 外側インターフェース
int_if="fxp0" # 内側インターフェース
internal_net="192.168.0.0/24" # 内側ネットワーク
altq on $ext_if priq bandwidth 400Kb queue { default ack } # ADSLなので上りを少し絞る
queue default priq(default) # 一般道
queue ack priority 6 # ACK優先道
nat on $ext_if from $internal_net to any -> ($ext_if) # NAT
rdr on $ext_if proto tcp to port 23 -> 192.168.0.2 port 23 # アレその1
rdr on $ext_if proto tcp to port 69 -> 192.168.0.2 port 69 # アレその2
rdr on $ext_if proto tcp to port 5900 -> 192.168.0.2 port 5900 # VNC
pass in all # 全部通す
pass out all # 全部通す
# TCPのACKを優先的に通す
pass out on $ext_if proto tcp from ($ext_if) to any flags S/SA keep state queue(default, ack)startup:
default:
load pppoe_client
pppoe_client:
create bundle static B1
set iface route default
set iface enable tcpmssfix
create link static L1 pppoe
set link action bundle B1
set link no acfcomp protocomp
set link disable pap
set link accept chap
set link max-redial 0
set link mtu 1454
set link mru 1454
set link keep-alive 10 60
set auth authname xxx
set ipcp yes vjcomp
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
set pppoe iface fxp0
set pppoe service ""
open[X] PAM_SMBPASS With PAM authentication vs passdb backends
+password sufficient /usr/local/lib/pam_smbpass.so migrate try_first_pass nullok
# adduser yukitaro # pdbedit -a yukitaro
# dd if=/dev/zero of=/dev/ad2 bs=1k count=1
# fdisk -BI ad2
# disklabel -B -w -r ad2s1 auto # disklabel -e da2s1
# newfs /dev/ad2s1a
| c-t S | split |
| c-t X | remove |
| c-t c-[ | copy |
| c-t c-] | paste |
| SPACE | set start and end point in copy mode |
% mkisofs -J -r -input-charset euc-jp -o hoge.iso hoge
# mdconfig -af hoge.iso md0 # mount -t cd9660 /dev/md0 /mnt # mdconfig -du md0
# burncd -s max data hoge.iso fixate
device atapicam
# cdrdao copy --device 1,0,0 --speed 8
% cue2toc hoge.cue > hoge.toc
# cdrdao write --device 1,0,0 --speed 8 hoge.toc
CD_DA
TRACK AUDIO
FILE "hoge01.wav" 00:00:00 04:55:37
CD_DA TRACK AUDIO FILE "CDImage.wav" 00:00:00 04:11:00 TRACK AUDIO FILE "CDImage.wav" 04:11:00 05:05:62 START 00:02:00 TRACK AUDIO FILE "CDImage.wav" 09:16:62 04:48:63 START 00:01:50
CD_DA
TRACK AUDIO
FILE "01 - Egao no Yokan ('Deep'Dream mix.).wav" 0
TRACK AUDIO
FILE "02 - Wonder Girl ('Deep'Club mix.).wav" 0
TRACK AUDIO
FILE "03 - Yureru Koi Otome Iro .wav" 0START 00:01:00例えばこんな風にすると,前のトラックのラスト1秒になったときに,トラックインデクスが現在のトラックに切り替わります。
mencoder hoge.mpg -ovc lavc -oac lavc -lavcopts vpass=1 -o /dev/null mencoder hoge.mpg -ovc lavc -oac lavc -lavcopts vbitrate=1500:vpass=2 -o hoge.avi
% mplayer tv://12 -tv driver=bsdbt848:input=1:norm=NTSC:chanlist=japan-bcast
% mixer =rec cd rec 20 cd 0 % mencoder tv://12 -tv driver=bsdbt848:input=1:norm=NTSC:chanlist=japan-bcast \\ -ovc lavc -oac lavc -o hoge.avi
#!/bin/sh mixer =rec line1 rec 15 line1 0 mencoder tv://$1 -tv driver=bsdbt848:input=1:norm=NTSC:chanlist=japan-bcast \\ -ovc lavc -oac lavc -lavcopts vbitrate=4000 -o $1-`date "+%Y-%m-%d"`.avi
#!/bin/sh mixer =rec line rec 25 wavrec -s 48000 -M -t 900 RJ-`date "+%Y-%m-%d"`.wav
ffmpeg -i input.mpg -vcodec mpeg4 -b 2048 -acodec mp3 -ab 160 \\
-r 29.97 -s 640x480 -ac 2 -g 15 -bf 2 -f avi output.avi