mbgtools-lx  4.2.8
ntp_shm.h File Reference
#include <sys/ipc.h>
#include <sys/shm.h>

Go to the source code of this file.

Data Structures

struct  shmTime
 Structure of NTP's shared memory segment. More...
 

Macros

#define _ext   extern
 
#define LEAP_NOWARNING   0x0
 
#define LEAP_ADDSECOND   0x1
 
#define LEAP_DELSECOND   0x2
 
#define LEAP_NOTINSYNC   0x3
 
#define MAX_SHM_REFCLOCKS   4
 Number of units (refclocks) supported by the SMH segment. More...
 
#define MAX_SHM_UNIT_OFFSET   128
 Max. Number of SHM unit offset. More...
 
#define NTPD_BASE   0x4e545030
 Basic SHM unit identifier (unit 0) More...
 

Functions

struct shmTimegetShmTime (int unit)
 
int ntpshm_init (struct shmTime **shmTime, int n_units, int n_unit0)
 

Macro Definition Documentation

◆ _ext

#define _ext   extern

Definition at line 38 of file ntp_shm.h.

Function Documentation

◆ getShmTime()

struct shmTime* getShmTime ( int  unit)

Definition at line 33 of file ntp_shm.c.

References NTPD_BASE.

Referenced by ntpshm_init().

◆ ntpshm_init()

int ntpshm_init ( struct shmTime **  shmTime,
int  n_units,
int  n_unit0 
)

Definition at line 62 of file ntp_shm.c.

References getShmTime(), shmTime::mode, n_unit0, n_units, shmTime::nsamples, and shmTime::precision.

Referenced by do_mbgsvctasks().