http://mail-index.netbsd.org/netbsd-announce/2010/09/13/msg000110.html
The NetBSD Foundation is pleased to announce NPF, a new packet filter
by Mindaugas Rasiukevicius. NPF is designed for high performance on
multiprocessor machines, and for easy extensibility.
Highlights of NPF features include
* MP-safety and locklessness for scalable MP performance: no longer is
the packet filter the bottleneck in your multicore router
* Fast hash-table and red-black tree lookups
* Stateful packet filtering, Network Address Port Translation (NAPT),
and Application-Level Gateways (ALGs) for, e.g., traceroute
* The N-Code processor, a packet-inspection engine inspired by BPF:
the N-Code processor is programmed to match packets using generic,
RISC-like instructions and a few CISC-like instructions for common
patterns such as IPv4 addresses
* Familiar configuration syntax and utilities
* Modularity and extensibility: users extend NPF by loading a kernel
module. NPF provides developers with an extensions API. NPF rules
can embed a hook that invokes an extension
By the end of January, NPF should have all of the capabilities that
NetBSD users have come to expect by using the other filters in the
kernel:
* IPv4 reassembly support
* Bi-directional NAT and port forwarding (re-direction)
* FTP proxy support
* IP header flags cleansing
* ICMP packets and TCP RST packet blocking
* Save/restore state
* Packet logging, configurable using filter rules
Rasiukevicius will also write documentation and configuration examples.
Beyond that, NPF needs code for IPv6 support. Rasiukevicius agrees to
provide technical support to developers who will add IPv6 support to
NPF. An outline of the steps to IPv6 support will be forthcoming.
NPF is the third packet filter in NetBSD, after IP Filter and PF. NPF
is unique for using a bytecode interpreter in its packet-inspection
engine, and for answering the question, "What does a packet filter
designed from the bottom up for multiprocessor systems look like?"
NPF development is sponsored by the NetBSD Foundation.
2010年9月14日 星期二
2010年9月2日 星期四
蘋果產品發表會 串流
http://events.apple.com.edgesuite.net/1009qpeijrfn/event
這個網址。
要怎麼同時讓全世界這麼多人收看呢?
看一下它的ip位址。
mac:~ adolf$ nslookup events.apple.com.edgesuite.net
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
events.apple.com.edgesuite.net canonical name = a314.g.akamai.net.
Name: a314.g.akamai.net
Address: 139.175.236.72
Name: a314.g.akamai.net
Address: 139.175.236.74
哇,太巧了,正好是seednet的ip,蘋果也用seednet嗎?
mac:~ adolf$ nslookup events.apple.com.edgesuite.net 168.95.1.1
Server: 168.95.1.1
Address: 168.95.1.1#53
Non-authoritative answer:
events.apple.com.edgesuite.net canonical name = a314.g.akamai.net.
Name: a314.g.akamai.net
Address: 203.69.113.8
Name: a314.g.akamai.net
Address: 203.69.113.48
單位不明的ip,不過用hinet的traceroute只有四個節點。
每個不同的isp會被導向到apple請akamai搞apple(後面是Akamai的技術)跟isp搞的伺服器去。
連giga和信超媒體也有。
新的ipod touch更接近iphone了。
新的apple tv很便宜,三千塊,可是在台灣.....應該不會有人要租0.99的影片,可不可以跟thepiratebay的東西sync也還不清楚。
這個網址。
要怎麼同時讓全世界這麼多人收看呢?
看一下它的ip位址。
mac:~ adolf$ nslookup events.apple.com.edgesuite.net
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
events.apple.com.edgesuite.net canonical name = a314.g.akamai.net.
Name: a314.g.akamai.net
Address: 139.175.236.72
Name: a314.g.akamai.net
Address: 139.175.236.74
哇,太巧了,正好是seednet的ip,蘋果也用seednet嗎?
mac:~ adolf$ nslookup events.apple.com.edgesuite.net 168.95.1.1
Server: 168.95.1.1
Address: 168.95.1.1#53
Non-authoritative answer:
events.apple.com.edgesuite.net canonical name = a314.g.akamai.net.
Name: a314.g.akamai.net
Address: 203.69.113.8
Name: a314.g.akamai.net
Address: 203.69.113.48
單位不明的ip,不過用hinet的traceroute只有四個節點。
每個不同的isp會被導向到apple請akamai搞
連giga和信超媒體也有。
新的ipod touch更接近iphone了。
新的apple tv很便宜,三千塊,可是在台灣.....應該不會有人要租0.99的影片,可不可以跟thepiratebay的東西sync也還不清楚。
2010年8月24日 星期二
免螢幕 免鍵盤 免網路線? 一條電線設定好Mac Mini Server
如果你的無線網路環境是沒有密碼的話,也許可以免網路線。
不過反正我有網路線。
環境
分享器一台,或是可以配發dhcp的東西,用macbook的網路分享也可以。
另外一台mac系統,安裝server admin tools用。(server光碟第二片)
網路線一條,接上去。
不過反正我有網路線。
環境
分享器一台,或是可以配發dhcp的東西,用macbook的網路分享也可以。
另外一台mac系統,安裝server admin tools用。(server光碟第二片)
網路線一條,接上去。
- 打開mini server
- 去分享器的地方看,目前的dhcp client,看一下mini server盒子上面的ethernet mac address,找到對應的ip是192.168.200.142
- 安裝server admin tools,打開server assistant。
- 加入一台新的server,密碼,盒子上面的serial前八位數字。
- 連線成功,開始之後的設定。
2010年7月25日 星期日
nfsd privileged port
http://mars.netanya.ac.il/~unesco/cdrom/LDP/NFS/HTML_FORMAT/NFS-HOWTO-6.html
Another important thing is to ensure that nfsd checks that all it's requests comes from a privileged port. If it accepts requests from any old port on the client a user with no special privileges can run a program that's is easy to obtain over the Internet. It talks nfs protocol and will claim that the user is anyone the user wants to be. Spooky. The Linux nfsd does this check by default, on other OSes you have to enable this check yourself. This should be described in the nfsd man page for the OS.
Another thing. Never export a file system to 'localhost' or 127.0.0.1. Trust me.
新版的說
http://nfs.sourceforge.net/nfs-howto/ar01s06.html
The TCP ports 1-1024 are reserved for root's use (and therefore sometimes referred to as "secure ports") A non-root user cannot bind these ports. Adding the secure option to an /etc/exports means that it will only listed to requests coming from ports 1-1024 on the client, so that a malicious non-root user on the client cannot come along and open up a spoofed NFS dialogue on a non-reserved port. This option is set by default.
舊的版本說,只要相信從1024以下來的client,而且不要給localhost連線。這有點道理,如果相信從localhost來的1024以上的連線,可能是假造的。
但是應該只要做其中一項就好了吧,外部的連線不管是不是1024以下的都有可能會是假的。
不知道為什麼linux的實作還是這樣。
在mac上面mount_nfs要加上
-o resvport
Use a reserved socket port number. This is useful for mounting
servers that require clients to use a reserved port number on the
mistaken belief that this makes NFS more secure. (For the rare
case where the client has a trusted root account but untrustwor-
thy users and the network cables are in secure areas this does
help, but for normal desktop clients this does not apply.)
意思就是說這樣根本沒什麼用就對了。
如果沒有加這個的話,會出現 /Volumes/nfs: Permission Denied
或是在nfs server /etc/exports 加上 insecure
Another important thing is to ensure that nfsd checks that all it's requests comes from a privileged port. If it accepts requests from any old port on the client a user with no special privileges can run a program that's is easy to obtain over the Internet. It talks nfs protocol and will claim that the user is anyone the user wants to be. Spooky. The Linux nfsd does this check by default, on other OSes you have to enable this check yourself. This should be described in the nfsd man page for the OS.
Another thing. Never export a file system to 'localhost' or 127.0.0.1. Trust me.
新版的說
http://nfs.sourceforge.net/nfs-howto/ar01s06.html
The TCP ports 1-1024 are reserved for root's use (and therefore sometimes referred to as "secure ports") A non-root user cannot bind these ports. Adding the secure option to an /etc/exports means that it will only listed to requests coming from ports 1-1024 on the client, so that a malicious non-root user on the client cannot come along and open up a spoofed NFS dialogue on a non-reserved port. This option is set by default.
舊的版本說,只要相信從1024以下來的client,而且不要給localhost連線。這有點道理,如果相信從localhost來的1024以上的連線,可能是假造的。
但是應該只要做其中一項就好了吧,外部的連線不管是不是1024以下的都有可能會是假的。
不知道為什麼linux的實作還是這樣。
在mac上面mount_nfs要加上
-o resvport
Use a reserved socket port number. This is useful for mounting
servers that require clients to use a reserved port number on the
mistaken belief that this makes NFS more secure. (For the rare
case where the client has a trusted root account but untrustwor-
thy users and the network cables are in secure areas this does
help, but for normal desktop clients this does not apply.)
意思就是說這樣根本沒什麼用就對了。
如果沒有加這個的話,會出現 /Volumes/nfs: Permission Denied
或是在nfs server /etc/exports 加上 insecure
2010年7月19日 星期一
AAC+/eAAC/AAC plus/Enhanced AAC
Shared library libaacplus
http://tipok.org.ua/node/17
with patch for ffmpeg, need to download source code from 3GPP.
3GPP Reference encoder
Floating Point: http://www.3gpp.org/ftp/Specs/html-info/26410.htm
Fixed Point: http://www.3gpp.org/ftp/Specs/html-info/26411.htm
aacplusenc
http://teknoraver.net/software/mp4tools/#download
Also with binary for Win/Linux/Mac platform.
NeroAAC
http://www.audiocoding.com/nero_aacenc.html
No source code
DarkGiank's enhAacPlusEnc
http://dgaapenc.berlios.de/en/#ins
To support 80kbps encoding, edit sbr_main.c
{ 64000, 80001, 24000, 2, 12, 9, 3, 0, -3, SBR_SWITCH_LRC, 2 }, /* nominal: 80 kbit/s 48khz*/
{ 64000, 80001, 22050, 2, 12, 9, 3, 0, -3, SBR_SWITCH_LRC, 2 }, /* nominal: 80 kbit/s 44.1khz*/
不知道為什麼不要乾脆都用AAC+ 80kbps來存音樂就好。thepiratebay上面有人分享48kbps的AAC+音樂, 可是種子太少沒有下載來聽。iTunes也支援最高到80kbps。
另外, Ogg Vorbis @48kbps 聽起來其實也不錯。
http://tipok.org.ua/node/17
with patch for ffmpeg, need to download source code from 3GPP.
3GPP Reference encoder
Floating Point: http://www.3gpp.org/ftp/Specs/html-info/26410.htm
Fixed Point: http://www.3gpp.org/ftp/Specs/html-info/26411.htm
aacplusenc
http://teknoraver.net/software/mp4tools/#download
Also with binary for Win/Linux/Mac platform.
NeroAAC
http://www.audiocoding.com/nero_aacenc.html
No source code
DarkGiank's enhAacPlusEnc
http://dgaapenc.berlios.de/en/#ins
To support 80kbps encoding, edit sbr_main.c
{ 64000, 80001, 24000, 2, 12, 9, 3, 0, -3, SBR_SWITCH_LRC, 2 }, /* nominal: 80 kbit/s 48khz*/
{ 64000, 80001, 22050, 2, 12, 9, 3, 0, -3, SBR_SWITCH_LRC, 2 }, /* nominal: 80 kbit/s 44.1khz*/
不知道為什麼不要乾脆都用AAC+ 80kbps來存音樂就好。thepiratebay上面有人分享48kbps的AAC+音樂, 可是種子太少沒有下載來聽。iTunes也支援最高到80kbps。
另外, Ogg Vorbis @48kbps 聽起來其實也不錯。
2010年7月17日 星期六
新酷音測試
/* * File: main.cpp * Author: adolf * * Created on 2010年7月17日, 上午 1:11 */ #include <stdlib.h> #include <stdio.h> #include <chewing/chewing.h> #include <chewing/global.h> #include <chewing/chewingio.h> #include <string.h> using namespace std; /* * */ int main(int argc, char** argv) { if (0 != chewing_Init("/Users/adolf/chewing/0.3.2/share/chewing/", ".")) { fprintf(stderr, "chewing_Init failed\n"); exit(-1); } ChewingConfigData config; ChewingContext * ctx = chewing_new(); chewing_set_maxChiSymbolLen(ctx, 16); chewing_set_candPerPage(ctx,10); char * str0 = "w96j0 eji6 g wu3 au4z/ "; //char * str = "1"; for (int i = 0; i < strlen(str0); i++) { //printf("%d\n",i); chewing_handle_Default(ctx, str0[i]); chewing_cand_Enumerate(ctx); if (chewing_cand_TotalChoice(ctx) >0) { while (chewing_cand_hasNext(ctx)) { char* str = chewing_cand_String(ctx); if (str) { //converted_string = utf8_mbstowcs( str ); printf("candidates %s\n", str); chewing_free(str); } } } else { if (chewing_buffer_Check(ctx)) { char * str = chewing_buffer_String(ctx); if (str) { printf("buffer %s\n", str); chewing_free(str); } } } if (chewing_commit_Check(ctx)) { char* str = chewing_commit_String(ctx); if (str) { printf("%s\n", str); chewing_free(str); } } } chewing_handle_Left(ctx); chewing_handle_Left(ctx); /* chewing_handle_Down(ctx); chewing_handle_Down(ctx); chewing_handle_Enter(ctx);*/ chewing_handle_Default(ctx,'v'); chewing_handle_Default(ctx,'u'); chewing_handle_Default(ctx,'l'); chewing_handle_Default(ctx,'3'); if (chewing_buffer_Check(ctx)) { char * str = chewing_buffer_String(ctx); if (str) { printf("buffer %s\n", str); chewing_free(str); } } return 0; }
2010年7月8日 星期四
android超級好用注音輸入法 1.0.2
1.0.3 新增功能說明
輸入'中'的時候,會出現
文,文系,了,共,區,午,原,古,和,國....樞神經,正大學,正機場,氣不足,泰賓館...
很多以中開頭的詞彙。
要一直翻到最後一頁的話乾脆就自己打完了。
這時候只要打注音ㄍ,就會出現中之後注音開頭ㄍ的詞彙前三個,例如 共,古,廣
如果打ㄍㄨㄛ... 就會出現 國人,國城,國菜...
不用打聲調, 打ㄍㄨㄛㄖㄣ,就會變成國人了。同理,打ㄊㄞㄅ一,就會出現泰賓館。
不喜歡的請到開發者網頁下載舊版1.0.2
不喜歡1.0.3的選詞功能的請下載這個。
另外
會在背景時候清理資料庫(vacuum), 最多一天一次。
某些rom會擋掉廣告,這些不能切換成中文鍵盤。
訂閱:
文章 (Atom)

