All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sir_common_misc.h
Go to the documentation of this file.
1 /*
2  * sir_common_misc.h
3  *
4  * Created on: Mar 17, 2014
5  * Author: root
6  */
7 
8 #ifndef SIR_COMMON_MISC_H_
9 #define SIR_COMMON_MISC_H_
10 
11 #include <cvmx.h>
12 #include <cvmx-helper.h>
13 #include <cvmx-csr.h>
14 #include <cvmx-fpa.h>
15 #include <common.h>
16 #include "common/sir_memlist.h"
17 
18 
19 #define IN6ADDRSZ 16
20 #define INADDRSZ 4
21 #define INT16SZ 2
22 
24 {
25 public:
26  static bool Configure_Port(int iPort, int iGrp);
27  static void Configure_System(void);
28  static bool SendNewPacket(CSiriusMemList *pBuffer, int iPort, CCaviumAccess::TPacketInfo* ptPacketInfo, uint32_t ui32QueueOffset, volatile void *pAddr, bool bIsAddr = false);
29 
30  static TIPAddr BitMask2IpMask(uint8_t ucBits, bool bMapped);
31  static uint8_t IpMask2BitMask(TIPAddr &tMask);
32 
33  static const char* ntop4(const u_char *src, char *dst, int size);
34  static const char* ntop6(const u_char *src, char *dst, int size);
35  static int pton4(const char *src, u_char *dst);
36  static int pton6(const char *src, u_char *dst);
37 };
38 
39 #endif /* SIR_COMMON_MISC_H_ */
static void Configure_System(void)
static const char * ntop4(const u_char *src, char *dst, int size)
static const char * ntop6(const u_char *src, char *dst, int size)
static bool SendNewPacket(CSiriusMemList *pBuffer, int iPort, CCaviumAccess::TPacketInfo *ptPacketInfo, uint32_t ui32QueueOffset, volatile void *pAddr, bool bIsAddr=false)
static uint8_t IpMask2BitMask(TIPAddr &tMask)
Struct contains an IPV4 or an IPV6 address.
Definition: packet-defines.h:7
static TIPAddr BitMask2IpMask(uint8_t ucBits, bool bMapped)
static int pton4(const char *src, u_char *dst)
static int pton6(const char *src, u_char *dst)
Most important class of Sirius. Used to maintain and process all kinds of queues. ...
Definition: sir_memlist.h:51
static bool Configure_Port(int iPort, int iGrp)