summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/include/recvbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/include/recvbuff.h')
-rw-r--r--contrib/ntp/include/recvbuff.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/ntp/include/recvbuff.h b/contrib/ntp/include/recvbuff.h
index 687bc96..4fde7f1 100644
--- a/contrib/ntp/include/recvbuff.h
+++ b/contrib/ntp/include/recvbuff.h
@@ -39,16 +39,16 @@ extern HANDLE get_recv_buff_event P((void));
*/
/*
- * the maximum length NTP packet is a full length NTP control message with
- * the maximum length message authenticator. I hate to hard-code 468 and 12,
- * but only a few modules include ntp_control.h...
+ * 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 1000.
*/
-#define RX_BUFF_SIZE (468+12+MAX_MAC_LEN)
+#define RX_BUFF_SIZE 1000 /* hail Mary */
struct recvbuf {
struct recvbuf *next; /* next buffer in chain */
union {
- struct sockaddr_in X_recv_srcadr;
+ struct sockaddr_storage X_recv_srcadr;
caddr_t X_recv_srcclock;
struct peer *X_recv_peer;
} X_from_where;
@@ -60,10 +60,10 @@ struct recvbuf {
WSABUF wsabuff;
DWORD AddressLength;
#else
- struct sockaddr_in srcadr; /* where packet came from */
+ struct sockaddr_storage srcadr; /* where packet came from */
#endif
struct interface *dstadr; /* interface datagram arrived thru */
- int fd; /* fd on which it was received */
+ SOCKET fd; /* fd on which it was received */
l_fp recv_time; /* time of arrival */
void (*receiver) P((struct recvbuf *)); /* routine to receive buffer */
int recv_length; /* number of octets received */
OpenPOWER on IntegriCloud