libicmp/includes/internal/icmp_socket.h
lohhiiccc 9e35dd86bb feat(socket): add raw socket utilities with tests
- Added `socket_create`.
 - Added `socket_configure`.
 - Added socket error utilities
 - Added unit tests.
2026-01-24 23:19:57 +01:00

16 lines
427 B
C

#ifndef ICMP_SOCKET_H
#define ICMP_SOCKET_H
#include "internal/icmp_internal.h"
/* Create raw ICMP socket */
int socket_create(struct icmp_handle *h);
/* Configure socket (non-blocking, buffer size) */
int socket_configure(struct icmp_handle *h);
/* Internal helpers for error handling */
void socket_clear_error(struct icmp_handle *h);
void socket_set_error(struct icmp_handle *h, int code, const char *fmt, ...);
#endif