ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbAcqUdp.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>
#include <arpa/inet.h>
#include <linux/version.h>
#include <ngc/core/ngcbDrv.h>

Classes

struct  ngcb_udp_t
 

Macros

#define _GNU_SOURCE
 
#define _REENTRANT
 
#define ETH_MTU   9000
 
#define MUDPI_MTU   (ETH_MTU - 28)
 
#define RTMS_MTU   (MUDPI_MTU - 32 - 2)
 
#define RTMS_PL_MAX   (RTMS_MTU - 16)
 

Functions

int _getIfAddr (const char *name, char *addr, char *erms)
 

Variables

ngcb_dma_api ngcbAcqUdp
 

Detailed Description

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ _REENTRANT

#define _REENTRANT

◆ ETH_MTU

#define ETH_MTU   9000

Maximum transmission unit size (ethernet payload)

◆ MUDPI_MTU

#define MUDPI_MTU   (ETH_MTU - 28)

Maximum space for the MUDPI packet

◆ RTMS_MTU

#define RTMS_MTU   (MUDPI_MTU - 32 - 2)

Maximum space for the RTMS packet

◆ RTMS_PL_MAX

#define RTMS_PL_MAX   (RTMS_MTU - 16)

Maximum RTMS payload size. This is 8922: 9000(MTU) - 28(IPv4,UDP) - 32(MUDPI hdr) - 2(MUDPI checksum) - 16(RTMS hdr)

Function Documentation

◆ _getIfAddr()

int _getIfAddr ( const char * name,
char * addr,
char * erms )

Get NIC address

Variable Documentation

◆ ngcbAcqUdp

ngcb_dma_api ngcbAcqUdp
Initial value:
= {
.Open = _open,
.Close = _close,
.Alloc = _alloc,
.Free = _free,
.Clr = ngcbDma0Clr,
.Init = _init,
.Stop = _stop,
.GetCnt = _getCnt,
.Wait = _wait,
.Stat = _getStatus,
.Overflow = ngcbDma0Overflow,
.IppCfg = ngcbDma0IppCfg,
.DevRd = ngcbDma0DevRd,
.DevWr = ngcbDma0DevWr,
.param = (ngcb_dma_p_t *)NULL,
.deviceOpen = 0
}
int ngcbDma0Overflow(ngcb_dma_p_t *dma, char *erms)
Definition ngcbDma0.c:381
int ngcbDma0Clr(ngcb_dma_p_t *dma, char *erms)
Definition ngcbDma0.c:223
int ngcbDma0DevWr(ngcb_dma_p_t *dma, unsigned int addr, unsigned int value, char *erms)
Definition ngcbDma0.c:441
int ngcbDma0DevRd(ngcb_dma_p_t *dma, unsigned int addr, unsigned int *value, char *erms)
Definition ngcbDma0.c:419
int ngcbDma0IppCfg(ngcb_dma_p_t *dma, int id, int *param, unsigned int n, char *erms)
Definition ngcbDma0.c:399
Definition ngcbDrv.h:72

API