2014年3月22日

常见递归&非递归实现

摘要: void my_strcpy(char *to,const char *from){ if('\0' == *from){ *to = '\0'; return ; } *to++ = *from++; my_strcpy(to,from);}//只拷贝n个字符void my_strncpy(char *to,const char* from,int n){ if( 0 == n || '\0' == *from){ *to = '\0'; return ; } *to++ = *from++; ... 阅读全文

posted @ 2014-03-22 21:48 程良 阅读(462) 评论(0) 推荐(0) 编辑

tcphdr结构

摘要: 包含在/usr/src/linux/include/linux/tcp.h 1 struct tcphdr { 2 __be16 source; 3 __be16 dest; 4 __be32 seq; 5 __be32 ack_seq; 6 #if defined(__LITTLE_ENDIAN_BITFIELD) 7 __u16 res1:4, 8 doff:4, 9 fin:1,10 syn:1,11 rst:1,12 psh... 阅读全文

posted @ 2014-03-22 20:40 程良 阅读(5257) 评论(0) 推荐(0) 编辑

导航