2011年8月4日 星期四

設定 Wireshark 解析無法被預設設定解析出來的封包

有時候我們改變 RFC 定義預設的 port number,Wireshark 就無法解析用預設的設定解析出封包。這時候我們可以在該封包上點滑鼠右鍵,選 Decode as,指定我們想要的 Protocol 解析方式,就可以看到原來 Protocol 應該顯示的欄位。

http://www.wireshark.org/docs/wsug_html_chunked/ChCustProtocolDissectionSection.html#ChAdvDecodeAsFig

SNMPv3 engine-id discovery

節錄自 RFC3414

4. Discovery
   The User-based Security Model requires that a discovery process
   obtains sufficient information about other SNMP engines in order to
   communicate with them.  Discovery requires an non-authoritative SNMP
   engine to learn the authoritative SNMP engine’s snmpEngineID value
   before communication may proceed.  This may be accomplished by
   generating a Request message with a securityLevel of noAuthNoPriv, a
   msgUserName of zero-length, a msgAuthoritativeEngineID value of zero
   length, and the varBindList left empty.  The response to this message
   will be a Report message containing the snmpEngineID of the
   authoritative SNMP engine as the value of the
   msgAuthoritativeEngineID field within the msgSecurityParameters field.  It contains a Report PDU with the usmStatsUnknownEngineIDs
   counter in the varBindList.
   If authenticated communication is required, then the discovery
   process should also establish time synchronization with the
   authoritative SNMP engine.  This may be accomplished by sending an
   authenticated Request message with the value of
   msgAuthoritativeEngineID set to the newly learned snmpEngineID and
   with the values of msgAuthoritativeEngineBoots and
   msgAuthoritativeEngineTime set to zero.  For an authenticated Request
   message, a valid userName must be used in the msgUserName field.  The
   response to this authenticated message will be a Report message
   containing the up to date values of the authoritative SNMP engine’s
   snmpEngineBoots and snmpEngineTime as the value of the
   msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime fields
   respectively.  It also contains the usmStatsNotInTimeWindows counter
   in the varBindList of the Report PDU.  The time synchronization then
   happens automatically as part of the procedures in section 3.2 step
   7b.  See also section 2.3.

2011年7月9日 星期六

Google Reader 快捷鍵


j/kitem down/upselects the next/previous item in the list
space/shift-spacepage down/upmoves the page down/up
n/pscan down/upin list view, selects the next item without opening it
oopen/close itemin list view, expands or collapses the selected item
enteropen/close itemin list view, expands or collapses the selected item
stoggle starstars the selected item
shift+stoggle shareshares the selected item
mmark as read/unreadswitches the read state of the selected item
ttag an itemopens the tagging field for the selected item
vview originalopens the original source for this article in a new window
shift+amark all as readmarks all items in the current view as read
1expanded viewdisplays the subscription as expanded items
2list viewdisplays the subscription as a list of headlines
rrefreshrefreshes the unread counts in the navigation
shift+n/pnavigation down/upselects the next/previous subscription or folder in the navigation
shift+xnavigation expand/collapseexpand or collapse a folder selected in the navigation
shift+onavigation open subscriptionopens the item currently selected in the navigation
g+hgo to homegoes to the Google Reader homepage
g+ago to all itemsgoes to the "All items" view
g+sgo to starred itemsgoes to the "Starred items" view
g+tgo to tagallows you to navigate to a tag by entering the tag name
g+ugo to subscriptionallows you to navigate to a subscription by entering the subscription name
utoggle full screen modehides and shows the list of subscriptions
?keyboard shortcuts helpdisplays a quick guide to all of Reader's shortcuts

2011年7月4日 星期一

From 華為 RD

看見了If,就想Else
看見malloc,就去找Free
函式呼叫要小心,需要看看返回值。
看到for迴圈,就找邊界值。
看見return要注意,要去前面找資源。
看見陣列把神提,問題往往在下標。
不要小看字串,長度是個大問題。
得到函數不要急,看看變數初始化,各種路徑要小心。
賦值函數最危險,變數沒有初始化。
九句句真言不孤立,相互結合顯神威