2008年4月11日 星期五

mkdev

dev_t MKDEV(unsigned int major, unsigned int minor);
Macro that builds adev_t data item from the major and minor numbers.

2008年4月10日 星期四

snmp

simple network management protocol

key components:
1. management stations(managers)
such as monitor and control network

2. network elements(Agent)
such as hosts, routers. each contains an agent

MIB( management information base)
a collection of MO( management object)
each agent maintain an MIB

SNMP service
1. get request
get the value of MO in the MIB of agent

2. get next request
get the value of next MO in the MIB of agent

3 set request
update the value of MO in the MIB of agent

4 trap request
report extraordinary events to manager

default UDP port:
manager: 162
agent : 161

OID(object identifier)

network related API

receive a message from a socket

ssize_t recvfrom (int socket, void *restrict buffer, size_t length,
int flags, struct sockaddr *restrict address,
socklen_t *restrict address_len);

ssize_t sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);

2008年4月9日 星期三

bat檔

MD:
create directory
ex: MD test\date

2008年4月2日 星期三

ctags

/usr/local/bin/ctags --excmd=number --tag-relative=no --fields=+a+m+n+S -R `pwd`
產生程式對應的tag

作用:
找出變數/函式定義的位置
(ex: use "find definition" of BBEdit)

iWeb's data

store in userName/Library/Application Support/iWeb

constructor on inheritance

if B extends from A, when B is created ,
the constructor sequence is :
(1) A's constructor
(2) B's constructor