⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utils.h

📁 altera epxa1的例子程序
💻 H
字号:
#ifndef _UTILS_
#define _UTILS_

#include "ip.h"


USHORT  bitrev16(USHORT din);
ULONG   bitrev32(ULONG din);
USHORT  checksum(UCHAR * buf, USHORT len);
int     str2hex(UCHAR * instr, UCHAR * hex);
int     str2dec(UCHAR * instr, UCHAR * dec);
void    anykey(void);

void    dump_buf(UCHAR *buf, int len);
void    dump_buf32(ULONG buf, int len);
void    dump_pkt(pkt_type *pktp, int len);
void    decode_pkt(pkt_type *pktp, int len);
void    decode_arp(arp_type *pktp);
void    decode_ip(ip_type *pktp);
void    decode_tcp(tcp_type *pktp);
void    decode_udp(udp_type *pktp);
void    decode_icmp(icmp_type *pktp);
void    decode_data(raw_type * pktp, int len);



#endif

⌨️ 快捷键说明

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