version 1.1.1.2, 2013/07/22 11:54:42
|
version 1.1.1.3, 2023/09/27 11:11:38
|
Line 30
|
Line 30
|
* |
* |
*/ |
*/ |
|
|
#if (HAVE_CONFIG_H) | #include "common.h" |
#include "../include/config.h" | |
#endif | |
#if (!(_WIN32) || (__CYGWIN__)) | |
#include "../include/libnet.h" | |
#else | |
#include "../include/win32/libnet.h" | |
#endif | |
|
|
int |
int |
libnet_adv_cull_packet(libnet_t *l, uint8_t **packet, uint32_t *packet_s) |
libnet_adv_cull_packet(libnet_t *l, uint8_t **packet, uint32_t *packet_s) |
Line 48 libnet_adv_cull_packet(libnet_t *l, uint8_t **packet,
|
Line 41 libnet_adv_cull_packet(libnet_t *l, uint8_t **packet,
|
if (l->injection_type != LIBNET_LINK_ADV) |
if (l->injection_type != LIBNET_LINK_ADV) |
{ |
{ |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
"%s(): advanced link mode not enabled\n", __func__); | "%s(): advanced link mode not enabled", __func__); |
return (-1); |
return (-1); |
} |
} |
|
|
Line 68 libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag
|
Line 61 libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag
|
if (l->injection_type != LIBNET_LINK_ADV) |
if (l->injection_type != LIBNET_LINK_ADV) |
{ |
{ |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
"%s(): advanced link mode not enabled\n", __func__); | "%s(): advanced link mode not enabled", __func__); |
return (-1); |
return (-1); |
} |
} |
|
|
Line 76 libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag
|
Line 69 libnet_adv_cull_header(libnet_t *l, libnet_ptag_t ptag
|
if (p == NULL) |
if (p == NULL) |
{ |
{ |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
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); |
return (-1); |
} |
} |
*header = p->buf; |
*header = p->buf; |
Line 93 libnet_adv_write_link(libnet_t *l, const uint8_t *pack
|
Line 86 libnet_adv_write_link(libnet_t *l, const uint8_t *pack
|
if (l->injection_type != LIBNET_LINK_ADV) |
if (l->injection_type != LIBNET_LINK_ADV) |
{ |
{ |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
"%s(): advanced link mode not enabled\n", __func__); | "%s(): advanced link mode not enabled", __func__); |
return (-1); |
return (-1); |
} |
} |
c = libnet_write_link(l, packet, packet_s); |
c = libnet_write_link(l, packet, packet_s); |
Line 127 libnet_adv_write_raw_ipv4(libnet_t *l, const uint8_t *
|
Line 120 libnet_adv_write_raw_ipv4(libnet_t *l, const uint8_t *
|
if (l->injection_type != LIBNET_RAW4_ADV) |
if (l->injection_type != LIBNET_RAW4_ADV) |
{ |
{ |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, |
"%s(): advanced raw4 mode not enabled\n", __func__); | "%s(): advanced raw4 mode not enabled", __func__); |
return (-1); |
return (-1); |
} |
} |
c = libnet_write_raw_ipv4(l, packet, packet_s); |
c = libnet_write_raw_ipv4(l, packet, packet_s); |
Line 167 libnet_adv_free_packet(libnet_t *l, uint8_t *packet)
|
Line 160 libnet_adv_free_packet(libnet_t *l, uint8_t *packet)
|
free(packet); |
free(packet); |
} |
} |
|
|
/* EOF */ | /** |
| * Local Variables: |
| * indent-tabs-mode: nil |
| * c-file-style: "stroustrup" |
| * End: |
| */ |