swrap: Rename swrap_marshall_packet().
authorAndreas Schneider <asn@samba.org>
Thu, 2 Oct 2014 05:14:04 +0000 (07:14 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 2 Oct 2014 07:35:10 +0000 (09:35 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/socket_wrapper/socket_wrapper.c

index b66fa8a87d59335d5f28d34cc051aa6c8c52684b..be48e184c290e1786c9078bd0177e7ba5c631b0b 100644 (file)
@@ -1935,11 +1935,11 @@ static int swrap_get_pcap_fd(const char *fname)
        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;
@@ -2073,7 +2073,7 @@ static uint8_t *swrap_marshall_packet(struct socket_info *si,
                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);
                }
@@ -2221,8 +2221,13 @@ static void swrap_dump_packet(struct socket_info *si,
                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;
        }