return fd;
}
-static uint8_t *swrap_marshall_packet(struct socket_info *si,
- const struct sockaddr *addr,
- enum swrap_packet_type type,
- const void *buf, size_t len,
- size_t *packet_len)
+static uint8_t *swrap_pcap_marshall_packet(struct socket_info *si,
+ const struct sockaddr *addr,
+ enum swrap_packet_type type,
+ const void *buf, size_t len,
+ size_t *packet_len)
{
const struct sockaddr *src_addr;
const struct sockaddr *dest_addr;
src_addr = si->peername;
if (si->type == SOCK_DGRAM) {
- return swrap_marshall_packet(si, si->peername,
+ return swrap_pcap_marshall_packet(si, si->peername,
SWRAP_SENDTO_UNREACH,
buf, len, packet_len);
}
return;
}
- packet = swrap_marshall_packet(si, addr, type, buf, len, &packet_len);
- if (!packet) {
+ packet = swrap_pcap_marshall_packet(si,
+ addr,
+ type,
+ buf,
+ len,
+ &packet_len);
+ if (packet == NULL) {
return;
}