003 File Manager
Current Path:
/usr/src/contrib/ntp/include
usr
/
src
/
contrib
/
ntp
/
include
/
📁
..
📄
Makefile.am
(1.2 KB)
📄
Makefile.in
(24.68 KB)
📄
README
(157 B)
📄
adjtime.h
(1.96 KB)
📄
ascii.h
(2.78 KB)
📄
audio.h
(283 B)
📄
binio.h
(3.26 KB)
📄
declcond.h
(803 B)
📄
gps.h
(2.84 KB)
📄
hopf6039.h
(3.51 KB)
📄
icom.h
(2.33 KB)
📄
ieee754io.h
(2.94 KB)
📄
intreswork.h
(808 B)
📄
iosignal.h
(1.46 KB)
📁
isc
📄
l_stdlib.h
(4.8 KB)
📄
lib_strbuf.h
(674 B)
📄
libntp.h
(436 B)
📄
libssl_compat.h
(4.25 KB)
📄
mbg_gps166.h
(36.84 KB)
📄
mx4200.h
(2.15 KB)
📄
ntif.h
(2.86 KB)
📄
ntp.h
(33.52 KB)
📄
ntp_assert.h
(2.73 KB)
📄
ntp_calendar.h
(14.99 KB)
📄
ntp_calgps.h
(4.02 KB)
📄
ntp_cmdargs.h
(38 B)
📄
ntp_config.h
(8.33 KB)
📄
ntp_control.h
(5.66 KB)
📄
ntp_crypto.h
(6.61 KB)
📄
ntp_datum.h
(1.07 KB)
📄
ntp_debug.h
(635 B)
📄
ntp_filegen.h
(1.76 KB)
📄
ntp_fp.h
(13.37 KB)
📄
ntp_if.h
(651 B)
📄
ntp_intres.h
(1.77 KB)
📄
ntp_io.h
(1.82 KB)
📄
ntp_keyacc.h
(658 B)
📄
ntp_libopts.h
(330 B)
📄
ntp_lineedit.h
(251 B)
📄
ntp_lists.h
(12.09 KB)
📄
ntp_machine.h
(7.18 KB)
📄
ntp_malloc.h
(1.18 KB)
📄
ntp_md5.h
(1.32 KB)
📄
ntp_net.h
(6.61 KB)
📄
ntp_prio_q.h
(1.93 KB)
📄
ntp_proto.h
(95 B)
📄
ntp_psl.h
(342 B)
📄
ntp_random.h
(402 B)
📄
ntp_refclock.h
(7.81 KB)
📄
ntp_request.h
(30.83 KB)
📄
ntp_rfc2553.h
(8.46 KB)
📄
ntp_select.h
(1.02 KB)
📄
ntp_stdlib.h
(9.83 KB)
📄
ntp_string.h
(708 B)
📄
ntp_syscall.h
(1.17 KB)
📄
ntp_syslog.h
(2.94 KB)
📄
ntp_tty.h
(2.61 KB)
📄
ntp_types.h
(7.21 KB)
📄
ntp_unixtime.h
(1.6 KB)
📄
ntp_worker.h
(5.54 KB)
📄
ntp_workimpl.h
(749 B)
📄
ntpd.h
(20.67 KB)
📄
ntpsim.h
(3.85 KB)
📄
parse.h
(14.58 KB)
📄
parse_conf.h
(2.76 KB)
📄
rc_cmdlength.h
(83 B)
📄
recvbuff.h
(3.84 KB)
📄
refclock_atom.h
(449 B)
📄
refidsmear.h
(89 B)
📄
safecast.h
(1.04 KB)
📄
ssl_applink.c
(2.1 KB)
📄
timepps-SCO.h
(11.67 KB)
📄
timepps-Solaris.h
(13.24 KB)
📄
timepps-SunOS.h
(11.78 KB)
📄
timespecops.h
(4.82 KB)
📄
timetoa.h
(2.62 KB)
📄
timevalops.h
(8.33 KB)
📄
timexsup.h
(1.37 KB)
📄
trimble.h
(8.01 KB)
📄
vint64ops.h
(1.05 KB)
Editing: recvbuff.h
#ifndef RECVBUFF_H #define RECVBUFF_H #include "ntp.h" #include "ntp_net.h" #include "ntp_lists.h" #include <isc/result.h> /* * recvbuf memory management */ #define RECV_INIT 64 /* 64 buffers initially */ #define RECV_LOWAT 3 /* when we're down to three buffers get more */ #define RECV_INC 32 /* [power of 2] get 32 more at a time */ #define RECV_BATCH 128 /* [power of 2] max increment in one sweep */ #define RECV_TOOMANY 4096 /* this should suffice, really. TODO: tos option? */ /* If we have clocks, keep an iron reserve of receive buffers for * clocks only. */ #if defined(REFCLOCK) # if !defined(RECV_CLOCK) || RECV_CLOCK == 0 # undef RECV_CLOCK # define RECV_CLOCK 16 # endif #else # if defined(RECV_CLOCK) # undef RECV_CLOCK # endif # define RECV_CLOCK 0 #endif #if defined HAVE_IO_COMPLETION_PORT # include "ntp_iocompletionport.h" # include "ntp_timer.h" # define RECV_BLOCK_IO() EnterCriticalSection(&RecvCritSection) # define RECV_UNBLOCK_IO() LeaveCriticalSection(&RecvCritSection) /* Return the event which is set when items are added to the full list */ extern HANDLE get_recv_buff_event(void); #else # define RECV_BLOCK_IO() # define RECV_UNBLOCK_IO() #endif /* * Format of a recvbuf. These are used by the asynchronous receive * routine to store incoming packets and related information. */ /* * the maximum length NTP packet contains the NTP header, one Autokey * request, one Autokey response and the MAC. Assuming certificates don't * get too big, the maximum packet length is set arbitrarily at 1200. * (was 1000, but that bumps on 2048 RSA keys) */ #define RX_BUFF_SIZE 1200 /* hail Mary */ typedef struct recvbuf recvbuf_t; struct recvbuf { recvbuf_t * link; /* next in list */ union { sockaddr_u X_recv_srcadr; caddr_t X_recv_srcclock; struct peer * X_recv_peer; } X_from_where; #define recv_srcadr X_from_where.X_recv_srcadr #define recv_srcclock X_from_where.X_recv_srcclock #define recv_peer X_from_where.X_recv_peer #ifndef HAVE_IO_COMPLETION_PORT sockaddr_u srcadr; /* where packet came from */ #else int recv_srcadr_len;/* filled in on completion */ #endif endpt * dstadr; /* address pkt arrived on */ SOCKET fd; /* fd on which it was received */ int msg_flags; /* Flags received about the packet */ l_fp recv_time; /* time of arrival */ void (*receiver)(struct recvbuf *); /* callback */ int recv_length; /* number of octets received */ union { struct pkt X_recv_pkt; u_char X_recv_buffer[RX_BUFF_SIZE]; } recv_space; #define recv_pkt recv_space.X_recv_pkt #define recv_buffer recv_space.X_recv_buffer int used; /* reference count */ }; extern void init_recvbuff(int); /* freerecvbuf - make a single recvbuf available for reuse */ extern void freerecvbuf(struct recvbuf *); /* Get a free buffer (typically used so an async * read can directly place data into the buffer * * The buffer is removed from the free list. Make sure * you put it back with freerecvbuf() or */ /* signal safe - no malloc, returns NULL when no bufs */ extern struct recvbuf *get_free_recv_buffer(int /*BOOL*/ urgent); /* signal unsafe - may malloc, returns NULL when no bufs */ extern struct recvbuf *get_free_recv_buffer_alloc(int /*BOOL*/ urgent); /* Add a buffer to the full list */ extern void add_full_recv_buffer(struct recvbuf *); /* number of recvbufs on freelist */ extern u_long free_recvbuffs(void); extern u_long full_recvbuffs(void); extern u_long total_recvbuffs(void); extern u_long lowater_additions(void); /* Returns the next buffer in the full list. * */ extern struct recvbuf *get_full_recv_buffer(void); /* * purge_recv_buffers_for_fd() - purges any previously-received input * from a given file descriptor. */ extern void purge_recv_buffers_for_fd(int); /* * Checks to see if there are buffers to process */ extern isc_boolean_t has_full_recv_buffer(void); #endif /* RECVBUFF_H */
Upload File
Create Folder