|
Packit |
96c956 |
/*
|
|
Packit |
96c956 |
chronyd/chronyc - Programs for keeping computer clocks accurate.
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
**********************************************************************
|
|
Packit |
96c956 |
* Copyright (C) Richard P. Curnow 1997-2002
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
96c956 |
* it under the terms of version 2 of the GNU General Public License as
|
|
Packit |
96c956 |
* published by the Free Software Foundation.
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
* This program is distributed in the hope that it will be useful, but
|
|
Packit |
96c956 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
96c956 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
96c956 |
* General Public License for more details.
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
* You should have received a copy of the GNU General Public License along
|
|
Packit |
96c956 |
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
Packit |
96c956 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
**********************************************************************
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
=======================================================================
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
Types used for addressing sources etc
|
|
Packit |
96c956 |
*/
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#ifndef GOT_ADDRESSING_H
|
|
Packit |
96c956 |
#define GOT_ADDRESSING_H
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#include "sysincl.h"
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
/* This type is used to represent an IPv4 address or IPv6 address.
|
|
Packit |
96c956 |
All parts are in HOST order, NOT network order. */
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#define IPADDR_UNSPEC 0
|
|
Packit |
96c956 |
#define IPADDR_INET4 1
|
|
Packit |
96c956 |
#define IPADDR_INET6 2
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
typedef struct {
|
|
Packit |
96c956 |
union {
|
|
Packit |
96c956 |
uint32_t in4;
|
|
Packit |
96c956 |
uint8_t in6[16];
|
|
Packit |
96c956 |
} addr;
|
|
Packit |
96c956 |
uint16_t family;
|
|
Packit |
96c956 |
uint16_t _pad;
|
|
Packit |
96c956 |
} IPAddr;
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
typedef struct {
|
|
Packit |
96c956 |
IPAddr ip_addr;
|
|
Packit |
96c956 |
unsigned short port;
|
|
Packit |
96c956 |
} NTP_Remote_Address;
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#define INVALID_IF_INDEX -1
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
typedef struct {
|
|
Packit |
96c956 |
IPAddr ip_addr;
|
|
Packit |
96c956 |
int if_index;
|
|
Packit |
96c956 |
int sock_fd;
|
|
Packit |
96c956 |
} NTP_Local_Address;
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#endif /* GOT_ADDRESSING_H */
|
|
Packit |
96c956 |
|