You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
819 B
22 lines
819 B
/* packet_dump — текстовая сводка IPv4-пакета: адреса, транспортные поля и короткий hex-фрагмент. |
|
* Принимает IP-пакет без ETCP-заголовка. Результат в общем static-буфере перезаписывается каждым вызовом; |
|
* его не освобождать, для хранения скопировать. Модуль не потокобезопасен и сам в лог не пишет. */ |
|
#ifndef PACKET_DUMP_H |
|
#define PACKET_DUMP_H |
|
|
|
#include <stdio.h> |
|
#include <stdint.h> |
|
#include <string.h> |
|
#include "../lib/platform_compat.h" |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
char* dump_ip_packet_to_buffer(const uint8_t* data, size_t len); |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#endif // PACKET_DUMP_H
|
|
|