debug.c

来自「该程序类似于tcpdump软件」· C语言 代码 · 共 35 行

C
35
字号
/**************************************************************************** 
** File: debug.c
**
** Author: Mike Borella
**
** Comments: Routines printing packets in raw form for debugging
**
** $Log: debug.c,v $
** Revision 1.2  1998/06/12 21:00:58  mborella
** Added log tag
**
*****************************************************************************/

#include <stdio.h>
#include <sys/types.h>
#include "config.h"

/*----------------------------------------------------------------------------
**
** dump_ascii()
**
** Print a packet in ascii format
**
**----------------------------------------------------------------------------
*/

void dump_ascii(u_char *p, u_char *ep)
{
  while(p <= ep)
    {
      printf("[%d]", (u_int8_t) *p);
      p++;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?