]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: code cleaning and comments
authorEric Leblond <eric@regit.org>
Fri, 5 Jan 2018 22:32:54 +0000 (23:32 +0100)
committerEric Leblond <eric@regit.org>
Tue, 6 Feb 2018 15:58:19 +0000 (16:58 +0100)
src/runmode-af-packet.c
src/source-af-packet.c

index 71337df9c6aee2069004352bc688ead84b8f3785..9fa8144ae2c49cb89e5e3677692414e2e4c745f8 100644 (file)
@@ -372,7 +372,7 @@ static void *ParseAFPConfig(const char *iface)
         aconf->ebpf_lb_file = NULL;
     } else {
 #ifdef HAVE_PACKET_EBPF
-        SCLogInfo("af-packet will use '%s' as eBPF load balancing file",
+        SCLogConfig("af-packet will use '%s' as eBPF load balancing file",
                   ebpf_file);
 #endif
         aconf->ebpf_lb_file = ebpf_file;
@@ -397,7 +397,7 @@ static void *ParseAFPConfig(const char *iface)
         aconf->ebpf_filter_file = NULL;
     } else {
 #ifdef HAVE_PACKET_EBPF
-        SCLogInfo("af-packet will use '%s' as eBPF filter file",
+        SCLogConfig("af-packet will use '%s' as eBPF filter file",
                   ebpf_file);
 #endif
         aconf->ebpf_filter_file = ebpf_file;
index f7ce87d3fa9112ed2f9125e5803332a021b567e7..6ad15e5ff18f8992927fe12c9460cb6a178ef102 100644 (file)
@@ -2259,6 +2259,7 @@ TmEcode AFPSetBPFFilter(AFPThreadVars *ptv)
  * \param mapfd file descriptor of the protocol bypass table
  * \param key data to use as key in the table
  * \param inittime time of creation of the entry (in monotonic clock)
+ * \return 0 in case of error, 1 if success
  */
 static int AFPInsertHalfFlow(int mapd, void *key, uint64_t inittime)
 {
@@ -2292,6 +2293,9 @@ static int AFPInsertHalfFlow(int mapd, void *key, uint64_t inittime)
 }
 #endif
 
+/**
+ * Bypass function for AF_PACKET capture
+ */
 static int AFPBypassCallback(Packet *p)
 {
 #ifdef HAVE_PACKET_EBPF