2012年9月17日
摘要: root@ubuntu:/etc/apt# vconfigExpecting argc to be 3-5, inclusive. Was: 1Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_in... 阅读全文
posted @ 2012-09-17 23:06 abacuspix 阅读(277) 评论(0) 推荐(0)
  2012年9月14日
摘要: When I have time I will add the commends.#include<stdio.h>int main(void){ printf("\n*s1=%15d*","aaabbbcccddd"); printf("\n*s2=%-5s*","aaa");}#include<stdio.h>int main(void){ long y = -43456; printf("y=%-8ld\n",y); printf("y=%-#8ld\n& 阅读全文
posted @ 2012-09-14 15:05 abacuspix 阅读(672) 评论(0) 推荐(0)
  2012年8月21日
摘要: SRX branch 升级窍门cd /cf/var/tmp 别的地方貌似空间不够root> request system software add junos-srxsme-12.1R2.9-domestic.tgz no-validate no-copy ##加快升级速度Formatting alternate root (/dev/da0s1a).../dev/da0s1a: 296.9MB (607996 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 74.22MB, 475... 阅读全文
posted @ 2012-08-21 21:22 abacuspix 阅读(1073) 评论(0) 推荐(0)
  2012年8月10日
摘要: #include <stdio.h>#define FUDGE(k) k+3.14159#define PR(a) printf("a= %d\t",(int)(a))#define PRINT(a) PR(a); putchar('\n')#define PRINT2(a,b) PR(a); PRINT(b)#define PRINT3(a,b,c) PR(a); PRINT2(b,c)#define MAX(a,b) (a<b?b:a)int main(void){ { int x=2; PRINT(x*FUDGE(2)); } { . 阅读全文
posted @ 2012-08-10 13:49 abacuspix 阅读(217) 评论(0) 推荐(0)
摘要: #include <stdio.h>#define FUDGE(k) k+3.14159#define PR(a) printf("a= %d\t",(int)(a))#define PRINT(a) PR(a); putchar('\n')#define PRINT2(a,b) PR(a); PRINT(b)#define PRINT3(a,b,c) PR(a); PRINT2(b,c)#define MAX(a,b) (a<b?b:a)int main(void){ { int x=2; PRINT(x*FUDGE(2)); } { . 阅读全文
posted @ 2012-08-10 13:46 abacuspix 阅读(229) 评论(0) 推荐(0)
摘要: #include <stdio.h>#define PR(format,value) printf(#value"= %"#format"\t",(value))#define NL putchar('\n')#define PRINT1(f,x1) PR(f,x1), NL#define PRINT2(f,x1,x2) PR(f,x1), PRINT1(f,x2)#define PRINT3(f,x1,x2,x3) PR(f,x1), PRINT2(f,x2,x3)#define PRINT4(f,x1,x2,x3,x4) 阅读全文
posted @ 2012-08-10 13:43 abacuspix 阅读(416) 评论(0) 推荐(0)
摘要: #include <stdio.h>#define PR(format,value) printf(#value"= %"#format"\t",(value))#define NL putchar('\n')#define PRINT1(f,x1) PR(f,x1), NL#define PRINT2(f,x1,x2) PR(f,x1), PRINT1(f,x2)#define PRINT3(f,x1,x2,x3) PR(f,x1), PRINT2(f,x2,x3)#define PRINT4(f,x1,x2,x3,x4) 阅读全文
posted @ 2012-08-10 13:35 abacuspix 阅读(233) 评论(0) 推荐(0)
  2012年8月9日
摘要: 打算学学Zebos的实现方式 先从简单的RIP 入手吧Junos:9.4R4.5 Vs Zebra简单构建了一套环境 R1---------------Zebos---------------R2代码结构如下ripdThis directory contains all the code for RIP supporting IPv4.Descriptionripd.h ripd.c Functions to initiate, stop, and destroy ripd instancesrip_api.h rip_api.c ... 阅读全文
posted @ 2012-08-09 15:18 abacuspix 阅读(847) 评论(1) 推荐(0)
摘要: //sc_4.c included filestatic int i=10;int next(){ return(i+=1);}int last(){ return (i-=1);}int new(i)int i;{ static int j=5; return (i=j+=i);}extern int i;reset(){ return (i);}#include <stdio.h>#define PR(format,value) printf(#value"= %"#format"\t",(value))#define NL putcha 阅读全文
posted @ 2012-08-09 13:14 abacuspix 阅读(201) 评论(0) 推荐(0)
摘要: /* Programming Style 1: Choose the Right Condition *Improve the following program fragments through reorganization */while(A) { if(B) continue; C;}do { if(!A) continue; else B; C; } while(A);if(A) if(B) if(C) D; else; else;else; if(B) if(C) E; el... 阅读全文
posted @ 2012-08-09 13:07 abacuspix 阅读(188) 评论(0) 推荐(0)