MCS Rate
http://www.cash.idv.tw/wordpress/?p=5914
2015年8月5日 星期三
2015年7月3日 星期五
source Insight 使用技巧
最近使用soruce insight 的一些常用技巧
Source Insight 4 遇到使用上非常log 卡頓
Source Insight 4 遇到使用上非常log 卡頓
=> Options -> Preference ->Display -> Page number in status bar 打勾取消
2015年5月19日 星期二
struct 宣告 在big_endian 和 little_endian 上的排列
若是以bit 為單位在
big_endian : struct 由上而下 在記憶體的位置則是以bits為單位 由高位排至低位
little_endian :struct 由上而下 在記憶體的位置以1byte 為單位 由最高位byte的最低位bit開始 往記憶體低位排
以ipv6 addr packet 的前4個byte 為例 (from wiki)
例子如下:
#ifdef _BIG_ENDIAN
uint32 version:4;
uint32 tclassH:4;
uint32 tclassL:4;
uint32 flow_lblH:4;
uint32 flow_lblL:16;
#elif _LITTLE_ENDIAN
uint32 tclassH:4;
uint32 version:4;
uint32 flow_lblH:4;
uint32 tclassL:4;
uint32 flow_lblL:16;
#endif
其中big_endian 其實也可以寫的更簡潔
uint32 version:4;
uint32 tclass:8;
uint32 flow_lblL:20;
big_endian : struct 由上而下 在記憶體的位置則是以bits為單位 由高位排至低位
little_endian :struct 由上而下 在記憶體的位置以1byte 為單位 由最高位byte的最低位bit開始 往記憶體低位排
以ipv6 addr packet 的前4個byte 為例 (from wiki)
例子如下:
#ifdef _BIG_ENDIAN
uint32 version:4;
uint32 tclassH:4;
uint32 tclassL:4;
uint32 flow_lblH:4;
uint32 flow_lblL:16;
#elif _LITTLE_ENDIAN
uint32 tclassH:4;
uint32 version:4;
uint32 flow_lblH:4;
uint32 tclassL:4;
uint32 flow_lblL:16;
#endif
其中big_endian 其實也可以寫的更簡潔
uint32 version:4;
uint32 tclass:8;
uint32 flow_lblL:20;
2015年5月13日 星期三
2015年4月20日 星期一
c語言中的0UL或1UL是什麼意思
0UL表示無符號長整型 0 1UL表示無符號長整型 1 如果不寫UL後綴,系統默認為:int, 即,有符號整數。
1.數值常數有:整型常數、浮點常數; 2.只有數值常數才有後綴說明; 3.數值常數後綴不區分字母大小寫。 (1)整型常數的表示形式有:十進制形式、以0開頭的八進制形式、以0x開頭的十六進制形式,無二進制形式。 整型常數默認是signed int的。 對整型常數進行類型轉換的後綴只有:u或U(unsigned)、l或L(long)、u/U與l/L的組合(如:ul、lu、Lu等)。例:100u; -123u; 0x123l; (2)浮點常數的表示形式有:科學計數形式和小數點形式。 浮點常數默認是double的。 對浮點常數進行類型轉換的後綴只有:f或F(單精度浮點數)、l或L(長雙精度浮點數)。(注:因浮點型常數總是有符號的,故沒有u或U後綴)。例:1.23e5f; 1.23l; -123.45f;
2015年4月17日 星期五
2015年4月16日 星期四
MTU MSS study
http://blog.crhan.com/2014/05/mtu-and-mss/
cisco (Resolve IP Fragmentation, MTU, MSS, and PMTUD Issues with GRE and IPSEC)
| 802.3ac | 1998 year | Max frame size extended to 1522 bytes (to allow "Q-tag") The Q-tag includes 802.1Q VLAN information and 802.1p priority information. |
2015年3月18日 星期三
synology NAS 建立 git server
基本上DSM 說明上有教你怎麼設定
若要允許使用者使用 Git:
- 使用具管理權限的帳號登入 DSM。前往控制台 > 終端機並啟動 SSH 服務。
- 啟動 Git 套件。選擇要讓哪些使用者從 repository check in 及 check out 檔案。
注意:
Git 使用者會受到 git-shell 之限制,僅能進行與 Git 相關的活動。此登入型 shell 會套用至 Git 使用者,以確保這些帳號僅用於 Git 相關之操作。因此,Git 使用者僅能使用 SSH 連線來 push 或 pull Git repository,無法完整存取 DSM。
若要新增 Git repository:
- 透過 SSH 以 root 或 admin 身份登入您的 Synology 伺服器。
- 變更目錄至 /volumeX (X 代表儲存空間編號) 來建立資料夾。例如:「git_repos」。該資料夾的權限會與 Linux 相同。
- 於資料夾中執行 git init 來建立空的 repository。
- Repository 建立完畢後,Git 用戶端可輸入下列指令來存取此 repository:
git clone ssh://[Git 使用者]@[您的 Synology 伺服器 IP 位址或主機名稱]/[Git repository 路徑]
照著上面設定完後就可以開心使用Git server 拉~~~ 才怪
2015年3月5日 星期四
訂閱:
文章 (Atom)
