--- embedaddon/libnet/src/libnet_advanced.c 2013/07/22 11:54:42 1.1.1.2 +++ embedaddon/libnet/src/libnet_advanced.c 2023/09/27 11:11:38 1.1.1.3 @@ -1,5 +1,5 @@ /* - * $Id: libnet_advanced.c,v 1.1.1.2 2013/07/22 11:54:42 misho Exp $ + * $Id: libnet_advanced.c,v 1.1.1.3 2023/09/27 11:11:38 misho Exp $ * * libnet * libnet_advanced.c - Advanced routines @@ -30,14 +30,7 @@ * */ -#if (HAVE_CONFIG_H) -#include "../include/config.h" -#endif -#if (!(_WIN32) || (__CYGWIN__)) -#include "../include/libnet.h" -#else -#include "../include/win32/libnet.h" -#endif +#include "common.h" int libnet_adv_cull_packet(libnet_t *l, uint8_t **packet, uint32_t *packet_s) @@ -48,7 +41,7 @@ libnet_adv_cull_packet(libnet_t *l, uint8_t **packet, if (l->injection_type != LIBNET_LINK_ADV) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "%s(): advanced link mode not enabled\n", __func__); + "%s(): advanced link mode not enabled", __func__); return (-1); } @@ -68,7 +61,7 @@ libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag if (l->injection_type != LIBNET_LINK_ADV) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "%s(): advanced link mode not enabled\n", __func__); + "%s(): advanced link mode not enabled", __func__); return (-1); } @@ -76,7 +69,7 @@ libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag if (p == NULL) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "%s(): ptag not found, you sure it exists?\n", __func__); + "%s(): ptag not found, you sure it exists?", __func__); return (-1); } *header = p->buf; @@ -93,7 +86,7 @@ libnet_adv_write_link(libnet_t *l, const uint8_t *pack if (l->injection_type != LIBNET_LINK_ADV) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "%s(): advanced link mode not enabled\n", __func__); + "%s(): advanced link mode not enabled", __func__); return (-1); } c = libnet_write_link(l, packet, packet_s); @@ -127,7 +120,7 @@ libnet_adv_write_raw_ipv4(libnet_t *l, const uint8_t * if (l->injection_type != LIBNET_RAW4_ADV) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "%s(): advanced raw4 mode not enabled\n", __func__); + "%s(): advanced raw4 mode not enabled", __func__); return (-1); } c = libnet_write_raw_ipv4(l, packet, packet_s); @@ -167,4 +160,9 @@ libnet_adv_free_packet(libnet_t *l, uint8_t *packet) free(packet); } -/* EOF */ +/** + * Local Variables: + * indent-tabs-mode: nil + * c-file-style: "stroustrup" + * End: + */