xuejianhui

导航

工作总结--琐碎操作和业务

★:连接服务器,添加路由(Windows):
解:要添加静态路由让目标为192.0.0.0网段的都转发到网为为192.7.130.1的路由上。
  >route add 192.0.0.0 mask 255.0.0.0 192.7.130.1 -p
  >route print

详细解说:http://www.cnblogs.com/real_dream/articles/1577889.html


★:远程连接 : 

  mstsc -v 10.166.177.132


★:make: warning: Clock skew detected. Your build may be incomplete.
因为makefile编译时是根据时间来指定目标文件的,系统时间跟编译时间不一致会导致这种情况。
可能会在SSH、虚拟机上出现。
使用一下命令可暂时解决:
  find . -type f | xargs -n 5 touch
  make clean
  make


 ★:extern char *strcat(char *dest,char *src);

  strcat(char *, char *)要做指针为NULL的判断


★:snprintf 和 sprintf 的区别:
  sprintf没有越界检查。
  snprintf函数原型:
  int snprintf(char *str, size_t size, const char *format, ...);
  函数说明:最多从源串中拷贝size-1个字符到目标串中,然后再在后面加一个’\0’。所以如果目标串的大小为size的话,将不会溢出。
  参数说明:
    char *str:目标数组地址
    size_t size:目标数组大小(一般用sizeof()表示)
    const char *format:格式化字符串
  函数返回值:若成功则返回欲写入的字符串长度,若出错则返回负值。
详细解说 :http://www.cnblogs.com/bo083/archive/2011/08/21/2152786.html


★:WireShark查看流命令

  (ip.src==192.7.130.165||ip.src==192.7.130.43)&&tcp&&tcp.port==6060

posted on 2012-11-02 10:05  xuejianhui  阅读(179)  评论(0编辑  收藏  举报