-/* Copyright (c) 2002-2009 InMon Corp. Licensed under the terms of the InMon sFlow licence: */
-/* http://www.inmon.com/technology/sflowlicense.txt */
+/* Copyright (c) 2002-2009 InMon Corp. Licensed under the terms of either the
+ * Sun Industry Standards Source License 1.1, that is available at:
+ * http://host-sflow.sourceforge.net/sissl.html
+ * or the InMon sFlow License, that is available at:
+ * http://www.inmon.com/technology/sflowlicense.txt
+ */
#ifndef SFLOW_API_H
#define SFLOW_API_H 1
callback in sfl_agent_init.*/
/* #define SFLOW_DO_SOCKET */
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
-#include <sys/types.h>
-#include <arpa/inet.h> /* for htonl */
#ifdef SFLOW_DO_SOCKET
#include <sys/socket.h>
#include <netinet/in_systm.h>
-#include <netinet/in.h>
#include <netinet/ip.h>
#endif
#include "sflow.h"
-
+
/* define SFLOW_SOFTWARE_SAMPLING to 1 if you need to use the
sfl_sampler_takeSample routine and give it every packet */
/* #define SFLOW_SOFTWARE_SAMPLING */
__________________________________
| cls| index | instance |
----------------------------------
-
+
but now is opened up to a 12-byte struct to ensure
that ds_index has a full 32-bit field, and to make
accessing the components simpler. The macros have
to get counters if it is not the same as the global ifIndex */
void sfl_poller_set_bridgePort(SFLPoller *poller, u_int32_t port_no);
u_int32_t sfl_poller_get_bridgePort(SFLPoller *poller);
+SFLPoller *sfl_agent_getPollerByBridgePort(SFLAgent *agent, u_int32_t port_no);
/* call this to indicate a discontinuity with a counter like samplePool so that the
sflow collector will ignore the next delta */