]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sflow.c
Try marking structures as UNALIGNED.
[tcpdump] / print-sflow.c
index e16f0ab32070ae6e2b77cb298d2ad891a1508296..dc64e63e748f605d71d25d97188657d4ffe41eda 100644 (file)
  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  * FOR A PARTICULAR PURPOSE.
  *
- * The SFLOW protocol as per http://www.sflow.org/developers/specifications.php
- *
  * Original code by Carles Kishimoto <[email protected]>
  *
  * Expansion and refactoring by Rick Jones <[email protected]>
  */
 
+/* \summary: sFlow protocol printer */
+
+/* specification: http://www.sflow.org/developers/specifications.php */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "extract.h"
 #include "addrtoname.h"
 
@@ -913,8 +915,8 @@ sflow_print(netdissect_options *ndo,
            len));
 
     /* skip Common header */
-    tptr += sizeof(const struct sflow_datagram_t);
-    tlen -= sizeof(const struct sflow_datagram_t);
+    tptr += sizeof(struct sflow_datagram_t);
+    tlen -= sizeof(struct sflow_datagram_t);
 
     while (nsamples > 0 && tlen > 0) {
         sflow_sample = (const struct sflow_sample_header *)tptr;