forked from osmocom/wireshark
all:
Merge .h files into .c files since .h files unused elsewhere; Do whitespace, indentation & formatting cleanup. packet-acn.c: Fix 2 minor bugs wherein subtree not displayed in packet-details because tree variable used in proto_tree_add_text() always NULL. svn path=/trunk/; revision=42647
This commit is contained in:
parent
2071275974
commit
2ed4baea4f
|
@ -1150,12 +1150,10 @@ DIRTY_DISSECTOR_SRC = \
|
||||||
#
|
#
|
||||||
DISSECTOR_INCLUDES = \
|
DISSECTOR_INCLUDES = \
|
||||||
$(PIDL_DISSECTOR_INCLUDES) \
|
$(PIDL_DISSECTOR_INCLUDES) \
|
||||||
packet-acn.h \
|
|
||||||
packet-acp133.h \
|
packet-acp133.h \
|
||||||
packet-acse.h \
|
packet-acse.h \
|
||||||
packet-actrace.h \
|
packet-actrace.h \
|
||||||
packet-afp.h \
|
packet-afp.h \
|
||||||
packet-afs.h \
|
|
||||||
packet-aim.h \
|
packet-aim.h \
|
||||||
packet-alcap.h \
|
packet-alcap.h \
|
||||||
packet-ansi_a.h \
|
packet-ansi_a.h \
|
||||||
|
@ -1164,14 +1162,11 @@ DISSECTOR_INCLUDES = \
|
||||||
packet-ap1394.h \
|
packet-ap1394.h \
|
||||||
packet-arcnet.h \
|
packet-arcnet.h \
|
||||||
packet-arp.h \
|
packet-arp.h \
|
||||||
packet-assa_r3_public.h \
|
|
||||||
packet-atalk.h \
|
packet-atalk.h \
|
||||||
packet-atm.h \
|
packet-atm.h \
|
||||||
packet-bacapp.h \
|
packet-bacapp.h \
|
||||||
packet-ber.h \
|
packet-ber.h \
|
||||||
packet-bfd.h \
|
packet-bfd.h \
|
||||||
packet-bgp.h \
|
|
||||||
packet-bootparams.h \
|
|
||||||
packet-bssap.h \
|
packet-bssap.h \
|
||||||
packet-bssgp.h \
|
packet-bssgp.h \
|
||||||
packet-bthci_acl.h \
|
packet-bthci_acl.h \
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,175 +0,0 @@
|
||||||
/* packet-acn.h
|
|
||||||
* Routines for ACN packet disassembly
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 by Erwin Rol <erwin@erwinrol.com>
|
|
||||||
* Copyright (c) 2006 by Electronic Theatre Controls, Inc.
|
|
||||||
* Bill Florac <bflorac@etcconnect.com>
|
|
||||||
*
|
|
||||||
* Wireshark - Network traffic analyzer
|
|
||||||
* By Gerald Combs <gerald@wireshark.org>
|
|
||||||
* Copyright 1999 Gerald Combs
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PACKET_ACN_H__
|
|
||||||
#define PACKET_ACN_H__
|
|
||||||
|
|
||||||
/* pdu flags */
|
|
||||||
#define ACN_PDU_FLAG_L 0x80
|
|
||||||
#define ACN_PDU_FLAG_V 0x40
|
|
||||||
#define ACN_PDU_FLAG_H 0x20
|
|
||||||
#define ACN_PDU_FLAG_D 0x10
|
|
||||||
|
|
||||||
#define ACN_DMX_OPTION_P 0x80
|
|
||||||
#define ACN_DMX_OPTION_S 0x40
|
|
||||||
|
|
||||||
#define ACN_DMP_ADT_FLAG_V 0x80 /* V = Specifies whether address is a virtual address or not. */
|
|
||||||
#define ACN_DMP_ADT_FLAG_R 0x40 /* R = Specifies whether address is relative to last valid address in packet or not. */
|
|
||||||
#define ACN_DMP_ADT_FLAG_D 0x30 /* D1, D0 = Specify non-range or range address, single data, equal size or mixed size data array */
|
|
||||||
#define ACN_DMP_ADT_EXTRACT_D(f) (((f) & ACN_DMP_ADT_FLAG_D) >> 4)
|
|
||||||
#define ACN_DMP_ADT_FLAG_X 0x0c /* X1, X0 = These bits are reserved and their values shall be set to 0 when encoded. Their values shall be ignored when decoding. */
|
|
||||||
#define ACN_DMP_ADT_FLAG_A 0x03 /* A1, A0 = Size of Address elements */
|
|
||||||
#define ACN_DMP_ADT_EXTRACT_A(f) ((f) & ACN_DMP_ADT_FLAG_A)
|
|
||||||
|
|
||||||
#define ACN_DMP_ADT_V_VIRTUAL 0
|
|
||||||
#define ACN_DMP_ADT_V_ACTUAL 1
|
|
||||||
|
|
||||||
#define ACN_DMP_ADT_R_ABSOLUTE 0
|
|
||||||
#define ACN_DMP_ADT_R_RELATIVE 1
|
|
||||||
|
|
||||||
#define ACN_DMP_ADT_D_NS 0
|
|
||||||
#define ACN_DMP_ADT_D_RS 1
|
|
||||||
#define ACN_DMP_ADT_D_RE 2
|
|
||||||
#define ACN_DMP_ADT_D_RM 3
|
|
||||||
|
|
||||||
#define ACN_DMP_ADT_A_1 0
|
|
||||||
#define ACN_DMP_ADT_A_2 1
|
|
||||||
#define ACN_DMP_ADT_A_4 2
|
|
||||||
#define ACN_DMP_ADT_A_R 3
|
|
||||||
|
|
||||||
#define ACN_PROTOCOL_ID_SDT 1
|
|
||||||
#define ACN_PROTOCOL_ID_DMP 2
|
|
||||||
#define ACN_PROTOCOL_ID_DMX 3
|
|
||||||
#define ACN_PROTOCOL_ID_DMX_2 4
|
|
||||||
|
|
||||||
#define ACN_ADDR_NULL 0
|
|
||||||
#define ACN_ADDR_IPV4 1
|
|
||||||
#define ACN_ADDR_IPV6 2
|
|
||||||
#define ACN_ADDR_IPPORT 3
|
|
||||||
|
|
||||||
/* STD Messages */
|
|
||||||
#define ACN_SDT_VECTOR_UNKNOWN 0
|
|
||||||
#define ACN_SDT_VECTOR_REL_WRAP 1
|
|
||||||
#define ACN_SDT_VECTOR_UNREL_WRAP 2
|
|
||||||
#define ACN_SDT_VECTOR_CHANNEL_PARAMS 3
|
|
||||||
#define ACN_SDT_VECTOR_JOIN 4
|
|
||||||
#define ACN_SDT_VECTOR_JOIN_REFUSE 5
|
|
||||||
#define ACN_SDT_VECTOR_JOIN_ACCEPT 6
|
|
||||||
#define ACN_SDT_VECTOR_LEAVE 7
|
|
||||||
#define ACN_SDT_VECTOR_LEAVING 8
|
|
||||||
#define ACN_SDT_VECTOR_CONNECT 9
|
|
||||||
#define ACN_SDT_VECTOR_CONNECT_ACCEPT 10
|
|
||||||
#define ACN_SDT_VECTOR_CONNECT_REFUSE 11
|
|
||||||
#define ACN_SDT_VECTOR_DISCONNECT 12
|
|
||||||
#define ACN_SDT_VECTOR_DISCONNECTING 13
|
|
||||||
#define ACN_SDT_VECTOR_ACK 14
|
|
||||||
#define ACN_SDT_VECTOR_NAK 15
|
|
||||||
#define ACN_SDT_VECTOR_GET_SESSION 16
|
|
||||||
#define ACN_SDT_VECTOR_SESSIONS 17
|
|
||||||
|
|
||||||
#define ACN_REFUSE_CODE_NONSPECIFIC 1
|
|
||||||
#define ACN_REFUSE_CODE_ILLEGAL_PARAMS 2
|
|
||||||
#define ACN_REFUSE_CODE_LOW_RESOURCES 3
|
|
||||||
#define ACN_REFUSE_CODE_ALREADY_MEMBER 4
|
|
||||||
#define ACN_REFUSE_CODE_BAD_ADDR_TYPE 5
|
|
||||||
#define ACN_REFUSE_CODE_NO_RECIP_CHAN 6
|
|
||||||
|
|
||||||
#define ACN_REASON_CODE_NONSPECIFIC 1
|
|
||||||
/*#define ACN_REASON_CODE_ 2 */
|
|
||||||
/*#define ACN_REASON_CODE_ 3 */
|
|
||||||
/*#define ACN_REASON_CODE_ 4 */
|
|
||||||
/*#define ACN_REASON_CODE_ 5 */
|
|
||||||
#define ACN_REASON_CODE_NO_RECIP_CHAN 6
|
|
||||||
#define ACN_REASON_CODE_CHANNEL_EXPIRED 7
|
|
||||||
#define ACN_REASON_CODE_LOST_SEQUENCE 8
|
|
||||||
#define ACN_REASON_CODE_SATURATED 9
|
|
||||||
#define ACN_REASON_CODE_TRANS_ADDR_CHANGING 10
|
|
||||||
#define ACN_REASON_CODE_ASKED_TO_LEAVE 11
|
|
||||||
#define ACN_REASON_CODE_NO_RECIPIENT 12
|
|
||||||
|
|
||||||
#define ACN_DMP_VECTOR_UNKNOWN 0
|
|
||||||
#define ACN_DMP_VECTOR_GET_PROPERTY 1
|
|
||||||
#define ACN_DMP_VECTOR_SET_PROPERTY 2
|
|
||||||
#define ACN_DMP_VECTOR_GET_PROPERTY_REPLY 3
|
|
||||||
#define ACN_DMP_VECTOR_EVENT 4
|
|
||||||
#define ACN_DMP_VECTOR_MAP_PROPERTY 5
|
|
||||||
#define ACN_DMP_VECTOR_UNMAP_PROPERTY 6
|
|
||||||
#define ACN_DMP_VECTOR_SUBSCRIBE 7
|
|
||||||
#define ACN_DMP_VECTOR_UNSUBSCRIBE 8
|
|
||||||
#define ACN_DMP_VECTOR_GET_PROPERTY_FAIL 9
|
|
||||||
#define ACN_DMP_VECTOR_SET_PROPERTY_FAIL 10
|
|
||||||
#define ACN_DMP_VECTOR_MAP_PROPERTY_FAIL 11
|
|
||||||
#define ACN_DMP_VECTOR_SUBSCRIBE_ACCEPT 12
|
|
||||||
#define ACN_DMP_VECTOR_SUBSCRIBE_REJECT 13
|
|
||||||
#define ACN_DMP_VECTOR_ALLOCATE_MAP 14
|
|
||||||
#define ACN_DMP_VECTOR_ALLOCATE_MAP_REPLY 15
|
|
||||||
#define ACN_DMP_VECTOR_DEALLOCATE_MAP 16
|
|
||||||
|
|
||||||
#define ACN_DMP_REASON_CODE_NONSPECIFIC 1
|
|
||||||
#define ACN_DMP_REASON_CODE_NOT_A_PROPERTY 2
|
|
||||||
#define ACN_DMP_REASON_CODE_WRITE_ONLY 3
|
|
||||||
#define ACN_DMP_REASON_CODE_NOT_WRITABLE 4
|
|
||||||
#define ACN_DMP_REASON_CODE_DATA_ERROR 5
|
|
||||||
#define ACN_DMP_REASON_CODE_MAPS_NOT_SUPPORTED 6
|
|
||||||
#define ACN_DMP_REASON_CODE_SPACE_NOT_AVAILABLE 7
|
|
||||||
#define ACN_DMP_REASON_CODE_PROP_NOT_MAPPABLE 8
|
|
||||||
#define ACN_DMP_REASON_CODE_MAP_NOT_ALLOCATED 9
|
|
||||||
#define ACN_DMP_REASON_CODE_SUBSCRIPTION_NOT_SUPPORTED 10
|
|
||||||
#define ACN_DMP_REASON_CODE_NO_SUBSCRIPTIONS_SUPPORTED 11
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define ACN_DMX_VECTOR 2
|
|
||||||
|
|
||||||
#define ACN_PREF_DMX_DISPLAY_HEX 0
|
|
||||||
#define ACN_PREF_DMX_DISPLAY_DEC 1
|
|
||||||
#define ACN_PREF_DMX_DISPLAY_PER 2
|
|
||||||
|
|
||||||
#define ACN_PREF_DMX_DISPLAY_20PL 0
|
|
||||||
#define ACN_PREF_DMX_DISPLAY_16PL 1
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
guint32 start;
|
|
||||||
guint32 vector;
|
|
||||||
guint32 header;
|
|
||||||
guint32 data;
|
|
||||||
guint32 data_length;
|
|
||||||
} acn_pdu_offsets;
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
guint8 flags;
|
|
||||||
guint32 address; /* or first address */
|
|
||||||
guint32 increment;
|
|
||||||
guint32 count;
|
|
||||||
guint32 size;
|
|
||||||
guint32 data_length;
|
|
||||||
} acn_dmp_adt_type;
|
|
||||||
|
|
||||||
#endif /* !PACKET_ACN_H */
|
|
|
@ -36,9 +36,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/conversation.h>
|
#include <epan/conversation.h>
|
||||||
#include <epan/addr_resolv.h>
|
#include <epan/addr_resolv.h>
|
||||||
|
@ -46,7 +47,119 @@
|
||||||
#include <epan/strutil.h>
|
#include <epan/strutil.h>
|
||||||
|
|
||||||
#include "packet-rx.h"
|
#include "packet-rx.h"
|
||||||
#include "packet-afs.h"
|
|
||||||
|
#define AFS_PORT_FS 7000
|
||||||
|
#define AFS_PORT_CB 7001
|
||||||
|
#define AFS_PORT_PROT 7002
|
||||||
|
#define AFS_PORT_VLDB 7003
|
||||||
|
#define AFS_PORT_KAUTH 7004
|
||||||
|
#define AFS_PORT_VOL 7005
|
||||||
|
#define AFS_PORT_ERROR 7006 /* Doesn't seem to be used */
|
||||||
|
#define AFS_PORT_BOS 7007
|
||||||
|
#define AFS_PORT_UPDATE 7008
|
||||||
|
#define AFS_PORT_RMTSYS 7009
|
||||||
|
#define AFS_PORT_BACKUP 7021
|
||||||
|
|
||||||
|
#ifndef AFSNAMEMAX
|
||||||
|
#define AFSNAMEMAX 256
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AFSOPAQUEMAX
|
||||||
|
#define AFSOPAQUEMAX 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PRNAMEMAX 64
|
||||||
|
#define VLNAMEMAX 65
|
||||||
|
#define KANAMEMAX 64
|
||||||
|
#define BOSNAMEMAX 256
|
||||||
|
|
||||||
|
#define PRSFS_READ 1 /* Read files */
|
||||||
|
#define PRSFS_WRITE 2 /* Write files */
|
||||||
|
#define PRSFS_INSERT 4 /* Insert files into a directory */
|
||||||
|
#define PRSFS_LOOKUP 8 /* Lookup files into a directory */
|
||||||
|
#define PRSFS_DELETE 16 /* Delete files */
|
||||||
|
#define PRSFS_LOCK 32 /* Lock files */
|
||||||
|
#define PRSFS_ADMINISTER 64 /* Change ACL's */
|
||||||
|
|
||||||
|
#define CB_TYPE_EXCLUSIVE 1
|
||||||
|
#define CB_TYPE_SHARED 2
|
||||||
|
#define CB_TYPE_DROPPED 3
|
||||||
|
|
||||||
|
#define OPCODE_LOW 0
|
||||||
|
#define OPCODE_HIGH 66000 /* arbitrary, is just a fuzzy check for encrypted traffic */
|
||||||
|
#define VOTE_LOW 10000
|
||||||
|
#define VOTE_HIGH 10007
|
||||||
|
#define DISK_LOW 20000
|
||||||
|
#define DISK_HIGH 20013
|
||||||
|
|
||||||
|
#define FILE_TYPE_FILE 1
|
||||||
|
#define FILE_TYPE_DIR 2
|
||||||
|
#define FILE_TYPE_LINK 3
|
||||||
|
|
||||||
|
struct afs_header {
|
||||||
|
guint32 opcode;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct afs_volsync {
|
||||||
|
guint32 spare1;
|
||||||
|
guint32 spare2;
|
||||||
|
guint32 spare3;
|
||||||
|
guint32 spare4;
|
||||||
|
guint32 spare5;
|
||||||
|
guint32 spare6;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct afs_status {
|
||||||
|
guint32 InterfaceVersion;
|
||||||
|
guint32 FileType;
|
||||||
|
guint32 LinkCount;
|
||||||
|
guint32 Length;
|
||||||
|
guint32 DataVersion;
|
||||||
|
guint32 Author;
|
||||||
|
guint32 Owner;
|
||||||
|
guint32 CallerAccess;
|
||||||
|
guint32 AnonymousAccess;
|
||||||
|
guint32 UnixModeBits;
|
||||||
|
guint32 ParentVnode;
|
||||||
|
guint32 ParentUnique;
|
||||||
|
guint32 SegSize;
|
||||||
|
guint32 ClientModTime;
|
||||||
|
guint32 ServerModTime;
|
||||||
|
guint32 Group;
|
||||||
|
guint32 SyncCount;
|
||||||
|
guint32 spare1;
|
||||||
|
guint32 spare2;
|
||||||
|
guint32 spare3;
|
||||||
|
guint32 spare4;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct afs_volumeinfo {
|
||||||
|
guint32 Vid;
|
||||||
|
guint32 Type;
|
||||||
|
guint32 Type0;
|
||||||
|
guint32 Type1;
|
||||||
|
guint32 Type2;
|
||||||
|
guint32 Type3;
|
||||||
|
guint32 Type4;
|
||||||
|
guint32 ServerCount;
|
||||||
|
guint32 Server0;
|
||||||
|
guint32 Server1;
|
||||||
|
guint32 Server2;
|
||||||
|
guint32 Server3;
|
||||||
|
guint32 Server4;
|
||||||
|
guint32 Server5;
|
||||||
|
guint32 Server6;
|
||||||
|
guint32 Server7;
|
||||||
|
guint16 Part0;
|
||||||
|
guint16 Part1;
|
||||||
|
guint16 Part2;
|
||||||
|
guint16 Part3;
|
||||||
|
guint16 Part4;
|
||||||
|
guint16 Part5;
|
||||||
|
guint16 Part6;
|
||||||
|
guint16 Part7;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static int proto_afs = -1;
|
static int proto_afs = -1;
|
||||||
static int hf_afs_fs = -1;
|
static int hf_afs_fs = -1;
|
||||||
|
@ -1314,15 +1427,15 @@ static const value_string volume_types[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct afs_request_key {
|
struct afs_request_key {
|
||||||
guint32 conversation, epoch, cid, callnumber;
|
guint32 conversation, epoch, cid, callnumber;
|
||||||
guint16 service;
|
guint16 service;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct afs_request_val {
|
struct afs_request_val {
|
||||||
guint32 opcode;
|
guint32 opcode;
|
||||||
guint req_num;
|
guint req_num;
|
||||||
guint rep_num;
|
guint rep_num;
|
||||||
nstime_t req_time;
|
nstime_t req_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
static GHashTable *afs_request_hash = NULL;
|
static GHashTable *afs_request_hash = NULL;
|
||||||
|
|
|
@ -1,142 +0,0 @@
|
||||||
/* packet-afs.h
|
|
||||||
* Definitions for packet disassembly structures and routines
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Wireshark - Network traffic analyzer
|
|
||||||
* By Gerald Combs <gerald@wireshark.org>
|
|
||||||
* Copyright 1998 Gerald Combs
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PACKET_AFS_H
|
|
||||||
#define PACKET_AFS_H
|
|
||||||
|
|
||||||
#define AFS_PORT_FS 7000
|
|
||||||
#define AFS_PORT_CB 7001
|
|
||||||
#define AFS_PORT_PROT 7002
|
|
||||||
#define AFS_PORT_VLDB 7003
|
|
||||||
#define AFS_PORT_KAUTH 7004
|
|
||||||
#define AFS_PORT_VOL 7005
|
|
||||||
#define AFS_PORT_ERROR 7006 /* Doesn't seem to be used */
|
|
||||||
#define AFS_PORT_BOS 7007
|
|
||||||
#define AFS_PORT_UPDATE 7008
|
|
||||||
#define AFS_PORT_RMTSYS 7009
|
|
||||||
#define AFS_PORT_BACKUP 7021
|
|
||||||
|
|
||||||
#ifndef AFSNAMEMAX
|
|
||||||
#define AFSNAMEMAX 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef AFSOPAQUEMAX
|
|
||||||
#define AFSOPAQUEMAX 1024
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PRNAMEMAX 64
|
|
||||||
#define VLNAMEMAX 65
|
|
||||||
#define KANAMEMAX 64
|
|
||||||
#define BOSNAMEMAX 256
|
|
||||||
|
|
||||||
#define PRSFS_READ 1 /* Read files */
|
|
||||||
#define PRSFS_WRITE 2 /* Write files */
|
|
||||||
#define PRSFS_INSERT 4 /* Insert files into a directory */
|
|
||||||
#define PRSFS_LOOKUP 8 /* Lookup files into a directory */
|
|
||||||
#define PRSFS_DELETE 16 /* Delete files */
|
|
||||||
#define PRSFS_LOCK 32 /* Lock files */
|
|
||||||
#define PRSFS_ADMINISTER 64 /* Change ACL's */
|
|
||||||
|
|
||||||
#define CB_TYPE_EXCLUSIVE 1
|
|
||||||
#define CB_TYPE_SHARED 2
|
|
||||||
#define CB_TYPE_DROPPED 3
|
|
||||||
|
|
||||||
#define OPCODE_LOW 0
|
|
||||||
#define OPCODE_HIGH 66000 /* arbitrary, is just a fuzzy check for encrypted traffic */
|
|
||||||
#define VOTE_LOW 10000
|
|
||||||
#define VOTE_HIGH 10007
|
|
||||||
#define DISK_LOW 20000
|
|
||||||
#define DISK_HIGH 20013
|
|
||||||
|
|
||||||
#define FILE_TYPE_FILE 1
|
|
||||||
#define FILE_TYPE_DIR 2
|
|
||||||
#define FILE_TYPE_LINK 3
|
|
||||||
|
|
||||||
struct afs_header {
|
|
||||||
guint32 opcode;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct afs_volsync {
|
|
||||||
guint32 spare1;
|
|
||||||
guint32 spare2;
|
|
||||||
guint32 spare3;
|
|
||||||
guint32 spare4;
|
|
||||||
guint32 spare5;
|
|
||||||
guint32 spare6;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct afs_status {
|
|
||||||
guint32 InterfaceVersion;
|
|
||||||
guint32 FileType;
|
|
||||||
guint32 LinkCount;
|
|
||||||
guint32 Length;
|
|
||||||
guint32 DataVersion;
|
|
||||||
guint32 Author;
|
|
||||||
guint32 Owner;
|
|
||||||
guint32 CallerAccess;
|
|
||||||
guint32 AnonymousAccess;
|
|
||||||
guint32 UnixModeBits;
|
|
||||||
guint32 ParentVnode;
|
|
||||||
guint32 ParentUnique;
|
|
||||||
guint32 SegSize;
|
|
||||||
guint32 ClientModTime;
|
|
||||||
guint32 ServerModTime;
|
|
||||||
guint32 Group;
|
|
||||||
guint32 SyncCount;
|
|
||||||
guint32 spare1;
|
|
||||||
guint32 spare2;
|
|
||||||
guint32 spare3;
|
|
||||||
guint32 spare4;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct afs_volumeinfo {
|
|
||||||
guint32 Vid;
|
|
||||||
guint32 Type;
|
|
||||||
guint32 Type0;
|
|
||||||
guint32 Type1;
|
|
||||||
guint32 Type2;
|
|
||||||
guint32 Type3;
|
|
||||||
guint32 Type4;
|
|
||||||
guint32 ServerCount;
|
|
||||||
guint32 Server0;
|
|
||||||
guint32 Server1;
|
|
||||||
guint32 Server2;
|
|
||||||
guint32 Server3;
|
|
||||||
guint32 Server4;
|
|
||||||
guint32 Server5;
|
|
||||||
guint32 Server6;
|
|
||||||
guint32 Server7;
|
|
||||||
guint16 Part0;
|
|
||||||
guint16 Part1;
|
|
||||||
guint16 Part2;
|
|
||||||
guint16 Part3;
|
|
||||||
guint16 Part4;
|
|
||||||
guint16 Part5;
|
|
||||||
guint16 Part6;
|
|
||||||
guint16 Part7;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -28,11 +28,966 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/expert.h>
|
#include <epan/expert.h>
|
||||||
#include <epan/dissectors/packet-tcp.h>
|
#include <epan/dissectors/packet-tcp.h>
|
||||||
|
|
||||||
#include "packet-assa_r3_public.h"
|
/* */
|
||||||
|
/* System limits */
|
||||||
|
/* */
|
||||||
|
#define MAX_USERS 2400
|
||||||
|
#define MAX_TIMEZONES 32
|
||||||
|
#define MAX_EXCEPTIONS 64
|
||||||
|
#define MAX_EXCEPTIONGROUPS 64
|
||||||
|
#define MAX_EVENTENTRIES 10000
|
||||||
|
#define MAX_DECLINEDENTRIES 500
|
||||||
|
#define MAX_ALARMENTRIES 200
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enumerations
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ACCESSMODE_NONE = 0, /* 0 - No access mode (not used, not legal, I think) */
|
||||||
|
ACCESSMODE_PRIMARYONLY, /* 1 - Primary only */
|
||||||
|
ACCESSMODE_PRIMARYORAUX, /* 2 - Primary or aux field */
|
||||||
|
ACCESSMODE_PRIMARYANDAUX, /* 3 - Primary and aux field */
|
||||||
|
ACCESSMODE_PRIMARYTHENAUX, /* 4 - Primary required first, then aux */
|
||||||
|
ACCESSMODE_LAST /* 5 - Dummy, for range checking */
|
||||||
|
}
|
||||||
|
accessMode_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ADDUSERPARAMTYPE_DISPOSITION = 0, /* 0 - What we're supposed to do (add, delete, etc) */
|
||||||
|
ADDUSERPARAMTYPE_USERNO, /* 1 - User to manage (user number, U16) */
|
||||||
|
ADDUSERPARAMTYPE_ACCESSALWAYS, /* 2 - Access always (boolean) */
|
||||||
|
ADDUSERPARAMTYPE_ACCESSMODE, /* 3 - Access type (accessMode_e) */
|
||||||
|
ADDUSERPARAMTYPE_CACHED, /* 4 - Entry is managed by cache system (boolean) */
|
||||||
|
ADDUSERPARAMTYPE_USERTYPE, /* 5 - User type (userType_e) */
|
||||||
|
ADDUSERPARAMTYPE_PRIMARYFIELD, /* 6 - Primary field (MAX_CREDENTIALBYTES) */
|
||||||
|
ADDUSERPARAMTYPE_PRIMARYFIELDTYPE, /* 7 - Primary field type (fieldType_e); */
|
||||||
|
ADDUSERPARAMTYPE_AUXFIELD, /* 8 - Auxiliary field (MAX_CREDENTIALBYTES) */
|
||||||
|
ADDUSERPARAMTYPE_AUXFIELDTYPE, /* 9 - Auxiliary field type (fieldType_e) */
|
||||||
|
ADDUSERPARAMTYPE_TIMEZONE, /* 10 - Timezone bitmap (U32) */
|
||||||
|
ADDUSERPARAMTYPE_EXPIREON, /* 11 - Date on which user no longer granted access, if non-0 */
|
||||||
|
ADDUSERPARAMTYPE_USECOUNT, /* 12 - Use count */
|
||||||
|
ADDUSERPARAMTYPE_EXCEPTIONGROUP, /* 13 - Exception group */
|
||||||
|
ADDUSERPARAMTYPE_LAST
|
||||||
|
}
|
||||||
|
addUserParamType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ALARMID_NONE = 0, /* 0 - No alarm */
|
||||||
|
ALARMID_VALIDIN, /* 1 - Valid entry */
|
||||||
|
ALARMID_DENIEDACCESS, /* 2 - Denied access (bad credential) */
|
||||||
|
ALARMID_SECURED, /* 3 - Door closed & secured (only seen after alarms 3 or 4) */
|
||||||
|
ALARMID_DOORFORCED, /* 4 - Door forced */
|
||||||
|
ALARMID_KEYOVERRIDE, /* 5 - Key override */
|
||||||
|
ALARMID_INVALIDENTRY, /* 6 - Door open but invalid entry (key used?) */
|
||||||
|
ALARMID_DOORAJAR, /* 7 - Door ajar (needs .ja woman with Engrish accent) */
|
||||||
|
ALARMID_LOWBATTERY, /* 8 - Low battery alarm */
|
||||||
|
ALARMID_RXHELD, /* 9 - RX held */
|
||||||
|
ALARMID_LAST
|
||||||
|
}
|
||||||
|
alarmID_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
CAPABILITIES_USERS = 0, /* 0 - Number of users supported */
|
||||||
|
CAPABILITIES_TIMEZONES, /* 1 - Number of timezone supported */
|
||||||
|
CAPABILITIES_EXCEPTIONS, /* 2 - Number of exceptions supported */
|
||||||
|
CAPABILITIES_EXCEPTIONGROUPS, /* 3 - Number of exception groups supported */
|
||||||
|
CAPABILITIES_EVENTLOG, /* 4 - Number of event log entries supported */
|
||||||
|
CAPABILITIES_DECLINEDLOG, /* 5 - Number of declined log entries supported */
|
||||||
|
CAPABILITIES_ALARMLOG, /* 6 - Number of alarm log entries supported */
|
||||||
|
CAPABILITIES_TOTALEVENTS, /* 7 - Total events (EVENT_LAST - 1) */
|
||||||
|
CAPABILITIES_LAST
|
||||||
|
}
|
||||||
|
capabilities_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
CHECKSUMRESULT_CONFIGURATIONNVRAM = 0, /* 0 - Checksum results of the configuration NVRAM */
|
||||||
|
CHECKSUMRESULT_EXCEPTIONS, /* 1 - Checksum results of the exceptions NVRAM */
|
||||||
|
CHECKSUMRESULT_EXCEPTIONGROUPS, /* 2 - Checksum results of the exception groups NVRAM */
|
||||||
|
CHECKSUMRESULT_TZCALENDARS, /* 3 - Checksum results of the time zone calendar NVRAM */
|
||||||
|
CHECKSUMRESULT_TIMEZONES, /* 4 - Checksum results of the time zone NVRAM */
|
||||||
|
CHECKSUMRESULT_USERS, /* 5 - Checksum results of the users NVRAM */
|
||||||
|
CHECKSUMRESULT_CACHELRU, /* 6 - Checksum results of the cache LRU */
|
||||||
|
CHECKSUMRESULT_LAST
|
||||||
|
}
|
||||||
|
checksumResult_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
CMD_RESPONSE = 0, /* 0 - Response to command */
|
||||||
|
CMD_HANDSHAKE, /* 1 - Establish session */
|
||||||
|
CMD_KILLSESSION, /* 2 - Kill session */
|
||||||
|
CMD_QUERYSERIALNUMBER, /* 3 - Query serial number */
|
||||||
|
CMD_QUERYVERSION, /* 4 - Query version */
|
||||||
|
CMD_SETDATETIME, /* 5 - Set date and time */
|
||||||
|
CMD_QUERYDATETIME, /* 6 - Query date and time */
|
||||||
|
CMD_SETCONFIG, /* 7 - Set configuration options */
|
||||||
|
CMD_GETCONFIG, /* 8 - Read configuration options */
|
||||||
|
CMD_MANAGEUSER, /* 9 - Manage users (add/delete/replace/update) */
|
||||||
|
CMD_DELETEUSERS, /* 10 - Delete users (all/most/cached) */
|
||||||
|
CMD_DEFINEEXCEPTION, /* 11 - Define exception (old block holiday) */
|
||||||
|
CMD_DEFINEEXCEPTIONGROUP, /* 12 - Define exception group */
|
||||||
|
CMD_DEFINECALENDAR, /* 13 - Define calendar */
|
||||||
|
CMD_DEFINETIMEZONE, /* 14 - Define time zone */
|
||||||
|
CMD_RMTAUTHRETRY, /* 15 - Remote authorization retry */
|
||||||
|
CMD_FILTERS, /* 16 - Event log filter configuration */
|
||||||
|
CMD_ALARMCONFIGURE, /* 17 - Alarm condition configuration */
|
||||||
|
CMD_EVENTLOGDUMP, /* 18 - Dump event log */
|
||||||
|
CMD_DECLINEDLOGDUMP, /* 19 - Dump declined log */
|
||||||
|
CMD_ALARMLOGDUMP, /* 20 - Dump alarm log */
|
||||||
|
CMD_DOWNLOADFIRMWARE, /* 21 - Download firmware */
|
||||||
|
CMD_DOWNLOADFIRMWARETIMEOUT, /* 22 - Download firmware timeout (internal command only) */
|
||||||
|
CMD_POWERTABLESELECTION, /* 23 - Power table selection */
|
||||||
|
CMD_CLEARNVRAM, /* 24 - Clear nvram (config/event log/declined log/etc) */
|
||||||
|
CMD_DPAC, /* 25 - DPAC manipulation commands */
|
||||||
|
CMD_SELFTEST, /* 26 - Selftest (heh) */
|
||||||
|
CMD_RESET, /* 27 - Restart controller */
|
||||||
|
CMD_LOGWRITE, /* 28 - Write event to event log */
|
||||||
|
CMD_MFGCOMMAND, /* 29 - Manufacturing commands */
|
||||||
|
CMD_NVRAMBACKUP, /* 30 - Backup/restore/erase NVRAM */
|
||||||
|
CMD_EXTENDEDRESPONSE, /* 31 - Response to command (extended version) */
|
||||||
|
CMD_LAST
|
||||||
|
}
|
||||||
|
cmdCommand_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
CMDMFG_SETSERIALNUMBER = 0, /* 0 - Set serial number */
|
||||||
|
CMDMFG_SETCRYPTKEY, /* 1 - Set encryption key */
|
||||||
|
CMDMFG_DUMPNVRAM, /* 2 - Dump NVRAM */
|
||||||
|
CMDMFG_TERMINAL, /* 3 - DPAC terminal mode */
|
||||||
|
CMDMFG_REMOTEUNLOCK, /* 4 - Remote unlock (only on 'd' builds) */
|
||||||
|
CMDMFG_AUXCTLRVERSION, /* 5 - Request version of auxiliary controller */
|
||||||
|
CMDMFG_IOPINS, /* 6 - Read I/O pin states */
|
||||||
|
CMDMFG_ADCS, /* 7 - Read ADC values */
|
||||||
|
CMDMFG_HARDWAREID, /* 8 - Read hardware ID and CPU ID */
|
||||||
|
CMDMFG_CHECKPOINTLOGDUMP, /* 9 - Dump checkpoint log */
|
||||||
|
CMDMFG_CHECKPOINTLOGCLEAR, /* 10 - Clear checkpoint log */
|
||||||
|
CMDMFG_READREGISTERS, /* 11 - Read selected CPU registers */
|
||||||
|
CMDMFG_FORCEOPTIONS, /* 12 - Force I/O lines to certain states */
|
||||||
|
CMDMFG_COMMUSER, /* 13 - Fake a comm user entry */
|
||||||
|
CMDMFG_DUMPKEYPAD, /* 14 - Dump keypad debugging buffer */
|
||||||
|
CMDMFG_BATTERYCHECK, /* 15 - Force battery check */
|
||||||
|
CMDMFG_RAMREFRESH, /* 16 - Refresh RAM variables from NVRAM */
|
||||||
|
CMDMFG_TASKFLAGS, /* 17 - Dump task flags */
|
||||||
|
CMDMFG_TIMERCHAIN, /* 18 - Dump active timer chains */
|
||||||
|
CMDMFG_PEEKPOKE, /* 19 - Peek/poke CPU RAM memory */
|
||||||
|
CMDMFG_LOCKSTATE, /* 20 - Display global gLockState variable */
|
||||||
|
CMDMFG_CAPABILITIES, /* 21 - Read firmware capabilities (# users/event log entries, etc) */
|
||||||
|
CMDMFG_DUMPM41T81, /* 22 - Dump M41T81 RTC registers */
|
||||||
|
CMDMFG_DEBUGLOGDUMP, /* 23 - Dump debugging log */
|
||||||
|
CMDMFG_DEBUGLOGCLEAR, /* 24 - Clear debugging log */
|
||||||
|
CMDMFG_TESTWDT, /* 25 - Test watchdog */
|
||||||
|
CMDMFG_QUERYCKSUM, /* 26 - Query NVRAM checksum value */
|
||||||
|
CMDMFG_VALIDATECHECKSUMS, /* 27 - Validate checksums */
|
||||||
|
CMDMFG_REBUILDLRUCACHE, /* 28 - Rebuild LRC cache */
|
||||||
|
CMDMFG_TZUPDATE, /* 29 - Send TZCHANGE to tod.c */
|
||||||
|
CMDMFG_TESTPRESERVE, /* 30 - Test preserve save/restore code */
|
||||||
|
CMDMFG_MORTISESTATELOGDUMP, /* 31 - Dump the mortise state log */
|
||||||
|
CMDMFG_MORTISESTATELOGCLEAR, /* 32 - Clear the mortise state log */
|
||||||
|
CMDMFG_MORTISEPINS, /* 33 - Display current mortise pin status */
|
||||||
|
CMDMFG_HALTANDCATCHFIRE, /* 34 - Stop processor (optionally catch fire) */
|
||||||
|
CMDMFG_LAST
|
||||||
|
}
|
||||||
|
cmdMfgCommand_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
CONFIGITEM_SERIAL_NUMBER = 0, /* 0 - Ye olde serial number */
|
||||||
|
CONFIGITEM_CRYPT_KEY, /* 1 - The encryption/decryption key */
|
||||||
|
CONFIGITEM_HARDWARE_OPTIONS_MFG, /* 2 - Bit map of hardware options at manufacturing time (hardwareOptions_e) */
|
||||||
|
CONFIGITEM_HARDWARE_OPTIONS, /* 3 - Bit map of hardware options at runtime time (hardwareOptions_e) */
|
||||||
|
CONFIGITEM_NVRAM_CHANGES, /* 4 - Log of NVRAM changes since reset (which blocks were reset) */
|
||||||
|
|
||||||
|
CONFIGITEM_NVRAMDIRTY, /* 5 - NVRAM is (or might be) dirty */
|
||||||
|
CONFIGITEM_NVRAM_WV, /* 6 - NVRAM write verify (I2C parts only) */
|
||||||
|
CONFIGITEM_ENABLE_WDT, /* 7 - If true, and OPT_WATCHDOG enabled, enables WDT */
|
||||||
|
CONFIGITEM_EARLY_ACK, /* 8 - Generates early RESPONSE_COMMANDRECEIVED message for commands that take some time */
|
||||||
|
CONFIGITEM_CONSOLE_AES_ONLY, /* 9 - If set, requires AES encryption on serial communications */
|
||||||
|
CONFIGITEM_RADIO_AES_ONLY, /* 10 - If set, requires AES encryption on radio communications */
|
||||||
|
CONFIGITEM_NDRLE, /* 11 - RLE (Run Length Encoding) NVRAM dump enable/disable */
|
||||||
|
CONFIGITEM_SOMF, /* 12 - Stop on mortise failure */
|
||||||
|
CONFIGITEM_NOGAF, /* 13 - Prevents what should be fatal errors from being fatal (i.e, No One Gives A Flip) */
|
||||||
|
CONFIGITEM_CARD_READER_POWER, /* 14 - External mag reader power supply control */
|
||||||
|
CONFIGITEM_PROX_ENABLE, /* 15 - Prox into permanent sleep mode */
|
||||||
|
CONFIGITEM_CKSUMCONFIG, /* 16 - Configuration NVRAM checksum enable/disable */
|
||||||
|
CONFIGITEM_DAILY_BATTERY_CHECK, /* 17 - Enable/disable daily battery check */
|
||||||
|
CONFIGITEM_DAILY_BATTERY_CHECK_HOUR, /* 18 - If daily battery check enabled, top of the hour to check at */
|
||||||
|
CONFIGITEM_BATTERY_LOW, /* 19 - Return low battery status (TRUE = low) */
|
||||||
|
|
||||||
|
CONFIGITEM_LRU_HEAD, /* 20 - Cache LRU head pointer */
|
||||||
|
CONFIGITEM_LRU_TAIL, /* 21 - Cache LRU tail pointer */
|
||||||
|
CONFIGITEM_RTC_CALIBRATION, /* 22 - Signed 6 bit value written to M41T81 calibration register */
|
||||||
|
CONFIGITEM_ACVREQUESTER, /* 23 - Auxiliary controller version requester (fromDevice_e, internal variable) */
|
||||||
|
CONFIGITEM_LOCAL_LED, /* 24 - Local LED function assignment */
|
||||||
|
|
||||||
|
CONFIGITEM_ERRCNT_XORLEN, /* 25 - Error counter for XOR length not matching in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_CRC, /* 26 - Error counter for bad CRC in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_NOTSIGIL, /* 27 - Error counter for character received was not sigil in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_TIMEOUT, /* 28 - Error counter for timeout in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_TOOLONG, /* 29 - Error counter for packet too long in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_TOOSHORT, /* 30 - Error counter for packet too short in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_HITDEFAULT, /* 31 - Error counter for hitting default handler in protocol.c */
|
||||||
|
CONFIGITEM_ERRCNT_OVERRUN, /* 32 - Error counter for serial buffer overrun in serial.c */
|
||||||
|
CONFIGITEM_ERRCNT_UARTFE, /* 33 - Error counter for UART framing error in serial.c */
|
||||||
|
CONFIGITEM_ERRCNT_UARTOE, /* 34 - Error counter for UART overrun error in serial.c */
|
||||||
|
|
||||||
|
CONFIGITEM_DST_SET, /* 35 - Daylight savings time currently active */
|
||||||
|
CONFIGITEM_DST_MODE, /* 36 - Determines if repeating month/date, repeating month/day, or specific month/date (dstMode_e) */
|
||||||
|
CONFIGITEM_DST_FORWARD_MONTH, /* 37 - Month to skip forward on (1-12) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_FORWARD_DOM, /* 38 - Day of month to skip forward on (1-31) (DSTMODE_REPEATINGDATE, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_FORWARD_OOD, /* 39 - Occurence number of CONFIGITEM_DST_FORWARD_DOW to skip forward on (1-5) (DSTMODE_REPEATINGDOW) */
|
||||||
|
CONFIGITEM_DST_FORWARD_DOW, /* 40 - Day of week to skip forward on (1-7) (DSTMODE_REPEATINGDOW) */
|
||||||
|
CONFIGITEM_DST_FORWARD_HOUR, /* 41 - Hour of day of month to skip forward on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_FORWARD_MINUTE, /* 42 - Hour of day of month to skip forward on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_FORWARD_ADJUST, /* 43 - Number of minutes to move forward */
|
||||||
|
CONFIGITEM_DST_BACK_MONTH, /* 44 - Month to fall back on (1-12) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDAY, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_BACK_DOM, /* 45 - Day of month to fall back on (1-31) (DSTMODE_REPEATINGDATE, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_BACK_OOD, /* 46 - Occurence number of CONFIGITEM_DST_BACK_DOW to fall back on (1-5) (DSTMODE_REPEATINGDOW) */
|
||||||
|
CONFIGITEM_DST_BACK_DOW, /* 47 - Day of week to fall back on (1-7) (DSTMODE_REPEATINGDATE, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_BACK_HOUR, /* 48 - Hour of day of month to fall back on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_BACK_MINUTE, /* 49 - Hour of day of month to fall back on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
||||||
|
CONFIGITEM_DST_BACK_ADJUST, /* 50 - Number of minutes to move backwards */
|
||||||
|
|
||||||
|
CONFIGITEM_EVENTLOG_ZEROMEM, /* 51 - If set, event log memory is zeroed when event log cleared */
|
||||||
|
CONFIGITEM_EVENTLOG_BEGIN, /* 52 - Beginning record number when event log cleared */
|
||||||
|
CONFIGITEM_EVENTLOG_RECORD, /* 53 - Next event log record to write */
|
||||||
|
CONFIGITEM_EVENTLOG_ENTRIES, /* 54 - Number of entries in event log */
|
||||||
|
CONFIGITEM_EVENTLOG_WARNDEVICE, /* 55 - Event log warning device */
|
||||||
|
CONFIGITEM_EVENTLOG_WARNEVERY, /* 56 - Warn at every 'n' records (more or less) */
|
||||||
|
CONFIGITEM_EVENTLOG_RMTDEVICE, /* 57 - Device event log entries copied to (fromDevice_e) */
|
||||||
|
|
||||||
|
CONFIGITEM_DECLINEDLOG_ZEROMEM, /* 58 - If set, declined log memory is zeroed when declined log cleared */
|
||||||
|
CONFIGITEM_DECLINEDLOG_BEGIN, /* 59 - Beginning record number when declined log cleared */
|
||||||
|
CONFIGITEM_DECLINEDLOG_RECORD, /* 60 - Next declined log record to write */
|
||||||
|
CONFIGITEM_DECLINEDLOG_ENTRIES, /* 61 - Number of entries in declined log */
|
||||||
|
CONFIGITEM_DECLINEDLOG_WARNDEVICE, /* 62 - Declined record warning device */
|
||||||
|
CONFIGITEM_DECLINEDLOG_WARNEVERY, /* 63 - Warn at every 'n' records (more or less) */
|
||||||
|
CONFIGITEM_DECLINEDLOG_RMTDEVICE, /* 64 - Device declined entries copied to (fromDevice_e) */
|
||||||
|
|
||||||
|
CONFIGITEM_ALARMLOG_ZEROMEM, /* 65 - If set, alarm log memory is zeroed when alarm log cleared */
|
||||||
|
CONFIGITEM_ALARMLOG_BEGIN, /* 66 - Beginning record number when alarm log cleared */
|
||||||
|
CONFIGITEM_ALARMLOG_RECORD, /* 67 - Next alarm log record to write */
|
||||||
|
CONFIGITEM_ALARMLOG_ENTRIES, /* 68 - Number of entries in alarm log */
|
||||||
|
CONFIGITEM_ALARMLOG_WARNDEVICE, /* 69 - Alarm record warning device */
|
||||||
|
CONFIGITEM_ALARMLOG_WARNEVERY, /* 70 - Warn at every 'n' records (more or less) */
|
||||||
|
CONFIGITEM_ALARMLOG_RMTDEVICE, /* 71 - Device alarm entries copied to (fromDevice_e) */
|
||||||
|
|
||||||
|
CONFIGITEM_VISIBLE_FEEDBACK, /* 72 - Visible feedback on keypad presses enabled */
|
||||||
|
CONFIGITEM_AUDIBLE_FEEDBACK, /* 73 - Audible feedback on keypad presses enabled */
|
||||||
|
CONFIGITEM_VISIBLE_INDICATORS, /* 74 - Visible indicators on all actions (run dark) */
|
||||||
|
CONFIGITEM_AUDIBLE_INDICATORS, /* 75 - Audible indicators on all actions (run silent) */
|
||||||
|
CONFIGITEM_2NDPINDURATION, /* 76 - Number of seconds to wait for second PIN */
|
||||||
|
CONFIGITEM_LOCKOUT_ATTEMPTS, /* 77 - Number of pin/prox/magcard attempts before lockout */
|
||||||
|
CONFIGITEM_LOCKOUT_DURATION, /* 78 - Duration of lockout, in penta-seconds */
|
||||||
|
CONFIGITEM_KEYPAD_INACTIVITY, /* 79 - Duration in seconds with no key entries before key buffer cleared */
|
||||||
|
CONFIGITEM_ICIDLE_DURATION, /* 80 - If last credential was invalid, invalid attempt counter reset after this many seconds */
|
||||||
|
CONFIGITEM_WRITE_DECLINED_LOG, /* 81 - Declined log writing enable/disable */
|
||||||
|
CONFIGITEM_LOW_BATTERY_INDICATOR, /* 82 - Low battery audio/visual indicator enable/disable */
|
||||||
|
|
||||||
|
CONFIGITEM_PANIC_MODE, /* 83 - Enable/disable panic mode */
|
||||||
|
|
||||||
|
CONFIGITEM_TIMEZONE_ENABLE, /* 84 - Timezones enabled (applies to users, not passage modes) */
|
||||||
|
CONFIGITEM_EXCEPTION_ENABLE, /* 85 - Exceptions enabled (applies to users and passage modes) */
|
||||||
|
CONFIGITEM_AUTOUNLOCK_ENABLE, /* 86 - Auto-unlocking (schedule based) enabled */
|
||||||
|
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_EMERGENCY, /* 87 - DPAC/PWM lock priority for emergency users (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_SUPERVISOR, /* 88 - DPAC/PWM lock priority for supervisors (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_USER, /* 89 - DPAC/PWM lock priority for users (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_PASSAGE, /* 90 - DPAC/PWM lock priority for passage mode (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_PANIC, /* 91 - DPAC/PWM lock priority for panic mode/panic users (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_LOCKOUT, /* 92 - DPAC/PWM lock priority for remote unlock (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_RELOCK, /* 93 - DPAC/PWM lock priority for remote unlock (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_BOLTTHROWN, /* 94 - DPAC/PWM lock priority for bolt thrown (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_CONFIGCHANGE, /* 95 - DPAC/PWM lock priority for configuration change (CONFIGITEM_LOCK_TYPE) (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_PRIORITY_REMOTE, /* 96 - DPAC/PWM lock priority for remote unlock (lockPriority_e) */
|
||||||
|
CONFIGITEM_LOCK_TYPE, /* 97 - Type of lock (PWM, electric, magnetic) */
|
||||||
|
CONFIGITEM_DOUBLE_PULSE, /* 98 - Lock double pulse enabled */
|
||||||
|
CONFIGITEM_DOUBLE_DELAY, /* 99 - Delay between double pulses, in centiseconds */
|
||||||
|
CONFIGITEM_MOTOR_DURATION, /* 100 - Duration lock motor to run, in centiseconds */
|
||||||
|
CONFIGITEM_MORTISE_TYPE, /* 101 - Type of mortise connected to controller */
|
||||||
|
CONFIGITEM_UNLOCK_TIME, /* 102 - Normal unlock duration in seconds */
|
||||||
|
CONFIGITEM_EXT_UNLOCK_TIME, /* 103 - Extended unlock duration, in seconds */
|
||||||
|
CONFIGITEM_DOOR_AJAR_TIME, /* 104 - Time before door considered stuck open, in seconds */
|
||||||
|
|
||||||
|
CONFIGITEM_SESSION_TIMEOUT, /* 105 - Session timeout, in seconds */
|
||||||
|
CONFIGITEM_RETRY_ON_TIMEOUT, /* 106 - Retry lock-initiated sessions if comm session timed out (instead of terminated by remote end) */
|
||||||
|
|
||||||
|
CONFIGITEM_UNSOLICITED_ENCRYPT, /* 107 - Unsolicited messages are encrypted (encryptionScheme_e) */
|
||||||
|
CONFIGITEM_RMT_AUTH_TIMEOUT, /* 108 - Seconds to wait for remote authorization timeout (0 = no remote auth) */
|
||||||
|
CONFIGITEM_RMT_AUTH_DEVICE, /* 109 - Device remote authorization requests sent over (fromDevice_e) */
|
||||||
|
CONFIGITEM_ALARM_DEVICE, /* 110 - Device alarm condition connects via */
|
||||||
|
CONFIGITEM_NOTIFY_DEVICE, /* 111 - Notify user device */
|
||||||
|
CONFIGITEM_COMMUSER_DEVICE, /* 112 - Device comm user connects via */
|
||||||
|
CONFIGITEM_SCHEDULER_DEVICE, /* 113 - Device scheduler connects via */
|
||||||
|
|
||||||
|
CONFIGITEM_SCHEDULER_TYPE, /* 114 - Scheduling algorithm to use (schedulerType_e) */
|
||||||
|
CONFIGITEM_SCHEDULER_AWAKE, /* 115 - Number of decaseconds scheduler is awake for */
|
||||||
|
CONFIGITEM_SCHEDULER_PERIOD, /* 116 - Interval in minutes between scheduled wakeups (SCHEDULERTYPE_SIMPLE) */
|
||||||
|
CONFIGITEM_SCHEDULER_HOD, /* 117 - Hour of day map (SCHEDULERTYPE_HOD) */
|
||||||
|
CONFIGITEM_SCHEDULER_DOW, /* 118 - Day of month map (SCHEDULERTYPE_DOW) */
|
||||||
|
CONFIGITEM_SCHEDULER_DOM, /* 119 - Day of month map (SCHEDULERTYPE_DOM) */
|
||||||
|
CONFIGITEM_SCHEDULER_HM1, /* 120 - On at hour:minute #1 */
|
||||||
|
CONFIGITEM_SCHEDULER_HM2, /* 121 - On at hour:minute #2 */
|
||||||
|
CONFIGITEM_SCHEDULER_HM3, /* 122 - On at hour:minute #3 */
|
||||||
|
CONFIGITEM_SCHEDULER_HM4, /* 123 - On at hour:minute #4 */
|
||||||
|
|
||||||
|
CONFIGITEM_RADIO_TYPE, /* 124 - Radio type (None, DPAC, WiPort, etc) */
|
||||||
|
CONFIGITEM_RADIO_MODE, /* 125 - Radio mode (DPAC=active/passive) */
|
||||||
|
CONFIGITEM_RADIO_TIMEOUT, /* 126 - Number of seconds before we decide server didn't hear us (only in RADIOMODE_LOCKINITIATED) */
|
||||||
|
CONFIGITEM_RADIO_ATTEMPTS, /* 127 - Number of times to attempt connection to server (only in RADIOMODE_LOCKINITIATED) */
|
||||||
|
CONFIGITEM_RADIO_HOUSEKEEPING, /* 128 - Time we allow for radio housekeeping (associate with AP, etc) */
|
||||||
|
CONFIGITEM_RADIO_LEAPUSERNAME, /* 129 - LEAP username */
|
||||||
|
CONFIGITEM_RADIO_LEAPPASSWORD, /* 130 - LEAP password */
|
||||||
|
|
||||||
|
CONFIGITEM_INHIBIT_VOLTAGE, /* 131 - Voltage when battery is considered dead */
|
||||||
|
CONFIGITEM_LOW_VOLTAGE, /* 132 - Voltage when battery is considered low */
|
||||||
|
CONFIGITEM_PT_RANGE_1, /* 133 - Power table for 0.00 to 5.99 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_2, /* 134 - Power table for 6.00 to 6.49 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_3, /* 135 - Power table for 6.50 to 6.99 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_4, /* 136 - Power table for 7.00 to 7.49 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_5, /* 137 - Power table for 7.50 to 7.99 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_6, /* 138 - Power table for 8.00 to 8.49 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_7, /* 139 - Power table for 8.50 to 8.99 volts */
|
||||||
|
CONFIGITEM_PT_RANGE_8, /* 140 - Power table for 9.00 and up volts */
|
||||||
|
|
||||||
|
CONFIGITEM_MAGCARD_IFS, /* 141 - Include field separator character in returned data */
|
||||||
|
CONFIGITEM_MAGCARD_FIELDS, /* 142 - Mag card fields to include */
|
||||||
|
CONFIGITEM_MAGCARD_OFFSET, /* 143 - Offset into concatenated field */
|
||||||
|
CONFIGITEM_MAGCARD_DIGITS, /* 144 - Number of digits to return past offset */
|
||||||
|
|
||||||
|
CONFIGITEM_ALARMS, /* 145 - Alarms (not writable) */
|
||||||
|
CONFIGITEM_FILTERS, /* 146 - Event filter storage (not writable) */
|
||||||
|
CONFIGITEM_ALARMSTATE, /* 147 - Current alarm state (alarmID_e) */
|
||||||
|
CONFIGITEM_DOORSTATE, /* 148 - Current door state (doorState_e) */
|
||||||
|
|
||||||
|
CONFIGITEM_DPACDEBUG, /* 149 - Enable DPAC debug events to event log */
|
||||||
|
CONFIGITEM_FAILOPENSECURE, /* 150 - Fail open (false) or secure (true) on battery dead */
|
||||||
|
|
||||||
|
CONFIGITEM_REPLACED_VOLTAGE, /* 151 - If battery above this voltage, it's been replaced */
|
||||||
|
|
||||||
|
CONFIGITEM_RX_HELD_TIME, /* 152 - If RX held longer than this, sent RX held alarm */
|
||||||
|
CONFIGITEM_PACKET_TIMEOUT, /* 153 - Time (in seconds) that a complete packet must arrive in */
|
||||||
|
|
||||||
|
CONFIGITEM_EXTENDEDRESPONSE, /* 154 - Enables extended response (which includes original sequence number) */
|
||||||
|
CONFIGITEM_PASSAGEMODEINDICATOR, /* 155 - When lock in passage mode, LEDs show denied if set, granted if cleared (Squish #1133) */
|
||||||
|
|
||||||
|
CONFIGITEM_PFMRETURNTIME, /* 156 - Number of seconds power must be present to exit power fail death loop */
|
||||||
|
|
||||||
|
CONFIGITEM_LAST, /* Must be last item defined (All non-virtual items added above) */
|
||||||
|
|
||||||
|
CONFIGITEM_MAGIC_FIRST = 239, /* Next item is first magic command */
|
||||||
|
CONFIGITEM_MAGIC_USERFIELD, /* 240 - Virtual command to delete PIN '8989', add user '8989' */
|
||||||
|
CONFIGITEM_MAGIC_USERADD, /* 241 - Virtual command to add a user (PIN only) */
|
||||||
|
CONFIGITEM_MAGIC_USERDELETE, /* 242 - Virtual command to delete a user */
|
||||||
|
CONFIGITEM_MAGIC_NVRAMBACKUP, /* 243 - Virtual command to backup NVRAM to FLASH */
|
||||||
|
CONFIGITEM_MAGIC_NVRAMRESTORE, /* 244 - Virtual command to restore NVRAM from FLASH */
|
||||||
|
CONFIGITEM_MAGIC_NVRAMERASE, /* 245 - Virtual command to erase backed-up NVRAM */
|
||||||
|
CONFIGITEM_MAGIC_LAST /* *Really* the last item */
|
||||||
|
}
|
||||||
|
configItem_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
DELETEUSERS_ALL = 0, /* 0 - Delete ALL users, including master and emergency, restores default users */
|
||||||
|
DELETEUSERS_CACHED, /* 1 - Delete only cached users */
|
||||||
|
DELETEUSERS_LAST
|
||||||
|
}
|
||||||
|
deleteUsers_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
DISPOSITION_ADD = 0, /* 0 - Add, must not exist (by user number only) */
|
||||||
|
DISPOSITION_REPLACE, /* 1 - Replace, (add, but overwrite if necessary) */
|
||||||
|
DISPOSITION_UPDATE, /* 2 - Update, must already exist */
|
||||||
|
DISPOSITION_DELETE, /* 3 - Delete, exists or not is irrelevant */
|
||||||
|
DISPOSITION_RETRIEVE, /* 4 - Retrieve, must exist */
|
||||||
|
DISPOSITION_LAST
|
||||||
|
}
|
||||||
|
disposition_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
DOORSTATE_NONE = 0, /* 0 - No door state available */
|
||||||
|
DOORSTATE_SECURED, /* 1 - Door closed & secured */
|
||||||
|
DOORSTATE_DOORFORCED, /* 2 - Door forced */
|
||||||
|
DOORSTATE_KEYOVERRIDE, /* 3 - Key override */
|
||||||
|
DOORSTATE_DOORAJAR, /* 4 - Door ajar */
|
||||||
|
DOORSTATE_LAST
|
||||||
|
}
|
||||||
|
doorState_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
DSTMODE_NONE, /* 0 - Automatic DST switching disabled */
|
||||||
|
DSTMODE_REPEATINGDOM, /* 1 - Particular day on a particular month (Apr 2nd) */
|
||||||
|
DSTMODE_REPEATINGDOW, /* 2 - Day of week on a particular week of a particular month (Sunday of last week of April) */
|
||||||
|
DSTMODE_ONETIMEDOM, /* 3 - Like DSTMODE_REPEATINGDOM, but clears CONFIGITEM_DST_[FORWARD|BACK][MONTH|DAY] items */
|
||||||
|
DSTMODE_ONETIMEDOW, /* 4 - Like DSTMODE_REPEATINGDOW, but clears CONFIGITEM_DST_[FORWARD|BACK][MONTH|OOD|DOW] items */
|
||||||
|
DSTMODE_LAST
|
||||||
|
}
|
||||||
|
dstMode_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ENCRYPTIONSCHEME_NONE = 0, /* 0 - No encryption */
|
||||||
|
ENCRYPTIONSCHEME_ROLLING, /* 1 - XOR with crypt key, shift each byte */
|
||||||
|
ENCRYPTIONSCHEME_SN, /* 2 - XOR with serial number, shift each byte */
|
||||||
|
ENCRYPTIONSCHEME_AESIV, /* 3 - AES implementation (set initial vector) */
|
||||||
|
ENCRYPTIONSCHEME_AES, /* 4 - AES implementation */
|
||||||
|
ENCRYPTIONSCHEME_LAST
|
||||||
|
}
|
||||||
|
encryptionScheme_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
EVENT_INVALIDPIN = 0, /* 0 - Entered PIN was invalid */
|
||||||
|
EVENT_USER, /* 1 - Regular user has been granted access */
|
||||||
|
EVENT_ONETIME, /* 2 - One-time user has been granted access */
|
||||||
|
EVENT_PASSAGEBEGIN, /* 3 - Lock has unlocked because of auto-unlock mode */
|
||||||
|
EVENT_PASSAGEEND, /* 4 - Lock has relocked because of auto-unlock mode */
|
||||||
|
EVENT_BADTIME, /* 5 - Access attempted outside of allowed time/date */
|
||||||
|
EVENT_LOCKEDOUT, /* 6 - Access attempted during panic or lockout */
|
||||||
|
EVENT_LOWBATTERY, /* 7 - Battery is low */
|
||||||
|
EVENT_DEADBATTERY, /* 8 - Battery is dead */
|
||||||
|
EVENT_BATTERYREPLACED, /* 9 - Battery has been replaced */
|
||||||
|
EVENT_USERADDED, /* 10 - User added or changed */
|
||||||
|
EVENT_USERDELETED, /* 11 - User deleted */
|
||||||
|
EVENT_EMERGENCY, /* 12 - The emergency code was entered */
|
||||||
|
EVENT_PANIC, /* 13 - Somebody pushed the panic button */
|
||||||
|
EVENT_RELOCK, /* 14 - Relock code was entered */
|
||||||
|
EVENT_LOCKOUTBEGIN, /* 15 - Lockout code was entered */
|
||||||
|
EVENT_LOCKOUTEND, /* 16 - Lockout code was entered again */
|
||||||
|
EVENT_RESET, /* 17 - Lock was reset (restarted) */
|
||||||
|
EVENT_DATETIMESET, /* 18 - System date & time was set */
|
||||||
|
EVENT_LOGCLEARED, /* 19 - Event log cleared */
|
||||||
|
EVENT_DBRESET, /* 20 - User database reset */
|
||||||
|
EVENT_COMMSTARTED, /* 21 - Communications session started */
|
||||||
|
EVENT_COMMENDED, /* 22 - Communications session ended */
|
||||||
|
EVENT_FIRMWAREABORT, /* 23 - A firmware update aborted */
|
||||||
|
EVENT_FIRMWAREERROR, /* 24 - A firmware update encountered an error */
|
||||||
|
EVENT_FIRMWARETIMEOUT, /* 25 - Timeout expecting firmware download data record */
|
||||||
|
EVENT_DSTFALLBACK, /* 26 - Clock set back */
|
||||||
|
EVENT_DSTSPRINGFORWARD, /* 27 - Clock set forward */
|
||||||
|
EVENT_BOLTTHROWN, /* 28 - Bolt thrown */
|
||||||
|
EVENT_BOLTRETRACTED, /* 29 - Bolt retracted */
|
||||||
|
EVENT_MASTERCODE, /* 30 - Master code entered (clears panic, relock, and lockout) */
|
||||||
|
EVENT_COMMUSER, /* 31 - A comm user was activated */
|
||||||
|
EVENT_DPACDISABLED, /* 32 - DPAC disabled */
|
||||||
|
EVENT_NOTIFY, /* 33 - Notify user has been granted access */
|
||||||
|
EVENT_EXPIRED, /* 34 - Expired user attempted access */
|
||||||
|
EVENT_SUPERVISOR, /* 35 - The supervisor code was entered */
|
||||||
|
EVENT_MCCENTER, /* 36 - Entered MCC programming mode */
|
||||||
|
EVENT_MCCEXIT, /* 37 - Exited MCC programming mode */
|
||||||
|
EVENT_SERIALRXOVERRUN, /* 38 - Serial receiver overrun */
|
||||||
|
EVENT_DPACRXOVERRUN, /* 39 - DPAC receiver overrun */
|
||||||
|
EVENT_NVRAMPBCLEAR, /* 40 - NVRAM cleared by pushybutton */
|
||||||
|
EVENT_NVRAMLAYOUTCHANGE, /* 41 - NVRAM cleared by revision */
|
||||||
|
EVENT_NVRAMOK, /* 42 - NVRAM wasn't changed */
|
||||||
|
EVENT_USERREPLACED, /* 43 - User replaced */
|
||||||
|
EVENT_RADIOTIMEOUT, /* 44 - Radio timed out waiting for remote login */
|
||||||
|
EVENT_SUSPENDEDUSER, /* 45 - Suspended user attempted access */
|
||||||
|
EVENT_USERUPDATED, /* 46 - User updated */
|
||||||
|
EVENT_DOORBOLTED, /* 47 - Access denied because door is bolted */
|
||||||
|
EVENT_PANICACTIVE, /* 48 - Access denied because lock is in panic mode */
|
||||||
|
EVENT_PASSAGEACTIVE, /* 49 - Access denied because lock is in passage mode */
|
||||||
|
EVENT_PASSAGEINACTIVE, /* 50 - Access denied because lock is not in passage mode */
|
||||||
|
EVENT_BADACCESSMODE, /* 51 - Access denied because access mode is wierd */
|
||||||
|
EVENT_CLOCKERR, /* 52 - Error reading RTC */
|
||||||
|
EVENT_REMOTEUNLOCK, /* 53 - Remote unlock */
|
||||||
|
EVENT_TZHAUDISABLED, /* 54 - Time zone, exceptions, and auto-unlock functionality disabled */
|
||||||
|
EVENT_EVENTLOGWRAPPED, /* 55 - Event log wrapped */
|
||||||
|
EVENT_DECLINEDLOGWRAPPED, /* 56 - Declined log wrapped */
|
||||||
|
EVENT_ALARMLOGWRAPPED, /* 57 - Alarm log wrapped */
|
||||||
|
EVENT_RADIOBUSYEMERGENCY, /* 58 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYSUPERVISOR, /* 59 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYONETIME, /* 60 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYUSER, /* 61 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYPANIC, /* 62 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYREX, /* 63 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYLOCKOUT, /* 64 - Access denied because radio is busy */
|
||||||
|
EVENT_RADIOBUSYRELOCK, /* 65 - Access denied because radio is busy */
|
||||||
|
EVENT_BATTERYCHECKHELDOFF, /* 66 - Battery check was not performed (user number says why) */
|
||||||
|
EVENT_RMTAUTHREQUEST, /* 67 - Remote authorization request made */
|
||||||
|
EVENT_FIRMWAREUPDATE, /* 68 - A firmware update was attempted, and succeeded */
|
||||||
|
EVENT_FIRMWAREUPDATEFAILED, /* 69 - A firmware update was attempted, and failed */
|
||||||
|
EVENT_MSMFAILURE, /* 70 - Mortise state machine failure */
|
||||||
|
EVENT_CLOCKRESET, /* 71 - The RTC was reset, likely due to ESD */
|
||||||
|
EVENT_POWERFAIL, /* 72 - Power Fail Monitor (PFM) circuit triggered */
|
||||||
|
EVENT_DPAC501WENTSTUPID, /* 73 - DPAC-501 failed to release CTS on power up */
|
||||||
|
/*
|
||||||
|
* These are all internal debugging events. Real events should go before these.
|
||||||
|
*/
|
||||||
|
EVENT_CHECKSUMCONFIG, /* 74 - Performing checksum on configuration NVRAM */
|
||||||
|
EVENT_CHECKSUMTZ, /* 75 - Performing checksum on timezone data NVRAM */
|
||||||
|
EVENT_DEBUG, /* 76 - Debug event, could mean anything (programmer discretion) */
|
||||||
|
EVENT_LAST /* 77 - Everything must go before this entry */
|
||||||
|
}
|
||||||
|
event_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FIELDTYPE_NONE = 0, /* 0 - Field contains nothing */
|
||||||
|
FIELDTYPE_PIN, /* 1 - Field contains PIN */
|
||||||
|
FIELDTYPE_PROX, /* 2 - Field contains Prox card */
|
||||||
|
FIELDTYPE_MAGCARD, /* 3 - Field contains mag card */
|
||||||
|
FIELDTYPE_LAST
|
||||||
|
}
|
||||||
|
fieldType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FILTERMODE_NORMAL = 0, /* 0 - Filters events specified */
|
||||||
|
FILTERMODE_INVERT, /* 1 - Filters events not specified */
|
||||||
|
FILTERMODE_LAST
|
||||||
|
}
|
||||||
|
filterMode_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FILTERSELECT_RECORDING = 0, /* 0 - Recording filters */
|
||||||
|
FILTERSELECT_REPORTING, /* 1 - Reporting filters */
|
||||||
|
FILTERSELECT_LAST
|
||||||
|
}
|
||||||
|
filterSelect_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FORCEITEM_RADIOPOWER = 0, /* 0 - Radio power */
|
||||||
|
FORCEITEM_RADIOENABLE, /* 1 - Radio enable */
|
||||||
|
FORCEITEM_LEDRED, /* 2 - Red keypad LED */
|
||||||
|
FORCEITEM_LEDGREEN, /* 3 - Green keypad LED */
|
||||||
|
FORCEITEM_LEDYELLOW, /* 4 - Yellow keypad LED */
|
||||||
|
FORCEITEM_PIEZO, /* 5 - Keypad peizo */
|
||||||
|
FORCEITEM_MAGPOWER, /* 6 - Mag card reader power supply */
|
||||||
|
FORCEITEM_MAGLEDA, /* 7 - Mag card LED A (usually red) */
|
||||||
|
FORCEITEM_MAGLEDB, /* 8 - Mag card LED B (usually green) */
|
||||||
|
FORCEITEM_PROXPOWER, /* 13 - Prox circuitry power (opamps, etc) */
|
||||||
|
FORCEITEM_PROXPING, /* 14 - Prox PIC12F629 ping/sleep mode */
|
||||||
|
FORCEITEM_PROXMODE, /* 15 - Prox ping/read mode (selects 50hz/125KHz filters) */
|
||||||
|
FORCEITEM_I2CPOWER, /* 16 - I2C power */
|
||||||
|
FORCEITEM_MOTORARUN, /* 17 - Motor A run (to H-bridge) */
|
||||||
|
FORCEITEM_MOTORBRUN, /* 18 - Motor B run (to H-bridge) */
|
||||||
|
FORCEITEM_VMON, /* 19 - VMon (ADC 0 battery sense) */
|
||||||
|
FORCEITEM_PROX, /* 20 - Prox test mode (continuous 125KHz read) */
|
||||||
|
FORCEITEM_MORTISETEST, /* 21 - Force mortise into test mode */
|
||||||
|
FORCEITEM_KEYPADTEST, /* 22 - Force keypad into test mode */
|
||||||
|
FORCEITEM_MAGTEST, /* 23 - Force mag card test mode */
|
||||||
|
FORCEITEM_PROXTEST, /* 24 - Force prox card test mode */
|
||||||
|
FORCEITEM_ICLASSPOWER, /* 25 - iClass Prox power */
|
||||||
|
FORCEITEM_ICLASSRESET, /* 26 - iClass Prox reset */
|
||||||
|
FORCEITEM_LAST
|
||||||
|
}
|
||||||
|
forceItem_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FROMDEVICE_NONE = 0, /* 0 - Used to indicate no device */
|
||||||
|
FROMDEVICE_INTERNAL, /* 1 - Generated internally */
|
||||||
|
FROMDEVICE_KEYPAD, /* 2 - Generated from keypad */
|
||||||
|
FROMDEVICE_CONSOLE, /* 3 - Generated from console */
|
||||||
|
FROMDEVICE_WIFI, /* 4 - Generated from wi-fi (DPAC) */
|
||||||
|
FROMDEVICE_LAST
|
||||||
|
}
|
||||||
|
fromDevice_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
HARDWAREOPTIONS_NONE = 0x0000, /* No options installed (?!) */
|
||||||
|
HARDWAREOPTIONS_CLOCK = 0x0001, /* Has RTC installed (always set) */
|
||||||
|
HARDWAREOPTIONS_CONSOLE = 0x0002, /* Has serial console (always set) */
|
||||||
|
HARDWAREOPTIONS_KEYPAD = 0x0004, /* Has keypad installed */
|
||||||
|
HARDWAREOPTIONS_PROXREADER = 0x0008, /* Has Prox card circuitry installed */
|
||||||
|
HARDWAREOPTIONS_MAGREADER = 0x0010, /* Has magnetic card reader attached */
|
||||||
|
HARDWAREOPTIONS_1WIRE = 0x0020, /* Has Dallas 1-wire interface installed */
|
||||||
|
HARDWAREOPTIONS_WIFI = 0x0040, /* Has WiFi module installed (DPAC only, for now) */
|
||||||
|
HARDWAREOPTIONS_RS485 = 0x0080, /* Has RS-485 optioning (RS-232 assumed if not) */
|
||||||
|
HARDWAREOPTIONS_IR = 0x0100, /* Has IR LED communications interface installed */
|
||||||
|
HARDWAREOPTIONS_PUSHBUTTON = 0x0200, /* Has MCC pushbutton */
|
||||||
|
HARDWAREOPTIONS_WATCHDOG = 0x0400, /* Has watchdog option compiled in */
|
||||||
|
HARDWAREOPTIONS_ICLASSREADER = 0x0800, /* Has iClass OEM75 prox reader installed */
|
||||||
|
HARDWAREOPTIONS_AVAIL1000 = 0x1000, /* Not defined */
|
||||||
|
HARDWAREOPTIONS_AVAIL2000 = 0x2000, /* Not defined */
|
||||||
|
HARDWAREOPTIONS_AVAIL4000 = 0x4000, /* Not defined */
|
||||||
|
HARDWAREOPTIONS_AVAIL8000 = 0x8000, /* Not defined */
|
||||||
|
|
||||||
|
HARDWAREOPTIONS_RADIO = (HARDWAREOPTIONS_WIFI),
|
||||||
|
|
||||||
|
HARDWAREOPTIONS_LAST = 0xffff /* Place holder, don't use */
|
||||||
|
}
|
||||||
|
hardwareOptions_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
LOCALLED_NONE = 0, /* 0 - No assignment */
|
||||||
|
LOCALLED_RADIOPOWER, /* 1 - Follows radio power supply (lit=power on) */
|
||||||
|
LOCALLED_LOCKUNLOCKED, /* 2 - Follows strike state (lit=locked) */
|
||||||
|
LOCALLED_I2CPOWER, /* 3 - Follows I2C power (lit=power on) */
|
||||||
|
LOCALLED_AUTHCONSOLE, /* 4 - Follows authorization from console port (lit=authorized) */
|
||||||
|
LOCALLED_AUTHWIFI, /* 5 - Follows authorization from Wifi port (lit=authorized) */
|
||||||
|
LOCALLED_BATTERYLOW, /* 6 - Follows battery low status (lit=low) */
|
||||||
|
LOCALLED_BATTERYDEAD, /* 7 - Follows battery dead status (lit=battery dead) */
|
||||||
|
LOCALLED_PROXREADY, /* 8 - Follows Prox ready to read (lit=ready) */
|
||||||
|
LOCALLED_APACQUIRED, /* 9 - Follows WAP acquired via DPAC (lit=acquired) */
|
||||||
|
LOCALLED_PASSMODE, /* 10 - Follows DPAC entering pass mode (lit=pass mode successful) */
|
||||||
|
LOCALLED_PROXREAD, /* 11 - Follows receiving a prox read event (PROXCARDEVENT_READCARD) */
|
||||||
|
LOCALLED_CONNECTED, /* 12 - Follows the DPAC interrupt line, indicating connection status */
|
||||||
|
LOCALLED_DPACCTSTIMER, /* 13 - Follows DPAC CTS line, if asserted more than 5 seconds */
|
||||||
|
LOCALLED_PFMCHARGING, /* 14 - Follows the state of the PFM super-cap charger */
|
||||||
|
LOCALLED_LAST
|
||||||
|
}
|
||||||
|
localLED_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
LOCKPRIORITY_NONE = 0, /* 0 - Radio is not shut down for motor run, access not denied if radio is on */
|
||||||
|
LOCKPRIORITY_DPAC, /* 1 - Radio is not shut down for motor run, access denied if radio is on */
|
||||||
|
LOCKPRIORITY_LOCK, /* 2 - Radio is shut down for motor run, access not denied if radio is on */
|
||||||
|
LOCKPRIORITY_LAST
|
||||||
|
}
|
||||||
|
lockPriority_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
LOCKTYPE_NONE = 0, /* 0 - No lock present */
|
||||||
|
LOCKTYPE_PWM, /* 1 - PWM motor */
|
||||||
|
LOCKTYPE_ELECTRIC_STRIKE, /* 2 - Electric strike (normally de-energized, uses Motor A side of H-bridge) */
|
||||||
|
LOCKTYPE_MAGNETIC_LOCK, /* 3 - Magnetic lock (normally energized, uses Motor A side of H-bridge) */
|
||||||
|
LOCKTYPE_RELAY, /* 4 - Relay (normally de-energized, uses Motor B side of H-bridge) */
|
||||||
|
LOCKTYPE_LAST
|
||||||
|
}
|
||||||
|
lockType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
MFGFIELD_IOPINS = 0, /* 0 - Contains data about the state of the IO pins */
|
||||||
|
MFGFIELD_ADCS, /* 1 - Contains raw ADC data */
|
||||||
|
MFGFIELD_HARDWAREID, /* 2 - Contains hardware ID & revision of PIC */
|
||||||
|
MFGFIELD_CHECKPOINTLOG, /* 3 - Contains the checkpoint log data */
|
||||||
|
MFGFIELD_CPUREGISTERS, /* 4 - Contains the contents of selected PIC registers */
|
||||||
|
MFGFIELD_TASKFLAGS, /* 5 - Contains a list of all task flag values */
|
||||||
|
MFGFIELD_TIMERCHAIN, /* 6 - Contains a complete list of all active timers (timerData_t) */
|
||||||
|
MFGFIELD_PEEKPOKE, /* 7 - Contains results of peeking memory (U8, U16, U32, or string) */
|
||||||
|
MFGFIELD_LOCKSTATE, /* 8 - Contains the current passage mode flags (lockState_t) */
|
||||||
|
MFGFIELD_CAPABILITIES, /* 9 - Contains lock capability info (# users, event log entries, etc) */
|
||||||
|
MFGFIELD_DUMPM41T81, /* 10 - Contains a complete dump of the M41T81 RTC registers */
|
||||||
|
MFGFIELD_NVRAMCHECKSUMVALUE, /* 11 - Contains the 32-bit NVRAM checksum value */
|
||||||
|
MFGFIELD_CHECKSUMRESULTS, /* 12 - Contains results from checksumming exceptions, exceptiong roups, time zone calendars and time zones */
|
||||||
|
MFGFIELD_MORTISESTATELOG, /* 13 - Contains the last 32 mortise state changes */
|
||||||
|
MFGFIELD_MORTISEPINS, /* 14 - Contains the mortise pin status (S1,S2,S3,S4) */
|
||||||
|
MFGFIELD_KEYPADCHAR, /* 15 - Contains a character from the keypad */
|
||||||
|
MFGFIELD_MAGCARD, /* 16 - Contains mag card data */
|
||||||
|
MFGFIELD_PROXCARD, /* 17 - Contains prox card data */
|
||||||
|
MFGFIELD_LAST
|
||||||
|
}
|
||||||
|
mfgField_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
MORTISETYPE_NONE = 0, /* 0 - No mortise installed */
|
||||||
|
MORTISETYPE_S82276, /* 1 - Sargent 82276 mortise (A) */
|
||||||
|
MORTISETYPE_S82277, /* 2 - Sargent 82277 mortise, no cylinder (B) */
|
||||||
|
MORTISETYPE_S82278, /* 3 - Sargent 82278 mortise, no deadbolt (C) */
|
||||||
|
MORTISETYPE_S82279, /* 4 - Sargent 82279 mortise, no cylinder or deadbolt (D) */
|
||||||
|
MORTISETYPE_S10G77, /* 5 - Sargent 10G77 bored lock body (E) */
|
||||||
|
MORTISETYPE_S8877, /* 6 - Sargent 8877 mortise exit device (F) */
|
||||||
|
MORTISETYPE_S8878, /* 7 - Sargent 8878 mortise exit device, no cylinder (G) */
|
||||||
|
MORTISETYPE_S8977, /* 8 - Sargent 8977 mortise exit device (H) */
|
||||||
|
MORTISETYPE_S8978, /* 9 - Sargent 8978 mortise exit device, no cylinder (I) */
|
||||||
|
MORTISETYPE_CRML20x36, /* 10 - Corbin-Russwin ML20736/ML20836 mortise (J) */
|
||||||
|
MORTISETYPE_CRML20x35, /* 11 - Corbin-Russwin ML20735/ML20835 mortise, no cylinder (K) */
|
||||||
|
MORTISETYPE_CRML20x34, /* 12 - Corbin-Russwin ML20734/ML20834 mortise, no deadbolt (L) */
|
||||||
|
MORTISETYPE_CRML20x33, /* 13 - Corbin-Russwin ML20733/ML20833 mortise, no cylinder or deadbolt (M) */
|
||||||
|
MORTISETYPE_CRCL33x34, /* 14 - Corbin-Russwin CL33734/CL33834 bored lock body (N) */
|
||||||
|
MORTISETYPE_CR9X34, /* 15 - Corbin-Russwin 9734/9834 bored lock body (O) */
|
||||||
|
MORTISETYPE_CR9X33, /* 16 - Corbin-Russwin 9833/9833 bored lock body, no cylinder (P) */
|
||||||
|
MORTISETYPE_CR9MX34, /* 17 - Corbin-Russwin 9M734/9M834 bored lock body (Q) */
|
||||||
|
MORTISETYPE_CR9MX33, /* 18 - Corbin-Russwin 9M733/9M833 bored lock body, no cylinder (R) */
|
||||||
|
MORTISETYPE_LAST
|
||||||
|
}
|
||||||
|
mortiseType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
NVRAMCLEAROPTIONS_NONE = 0x0000, /* Place holder */
|
||||||
|
NVRAMCLEAROPTIONS_CFGINSTALLER = 0x0001, /* Options settable by the installer (lock type, etc) */
|
||||||
|
NVRAMCLEAROPTIONS_CFGADMIN = 0x0002, /* Options settable by the lock administrator (time, date, etc) */
|
||||||
|
NVRAMCLEAROPTIONS_EXCEPTIONS = 0x0004, /* The exceptions definitions */
|
||||||
|
NVRAMCLEAROPTIONS_EXCEPTIONGROUPS = 0x0008, /* The exception group definitions */
|
||||||
|
NVRAMCLEAROPTIONS_CALENDARS = 0x0010, /* The timezones calendar definitions */
|
||||||
|
NVRAMCLEAROPTIONS_TIMEZONES = 0x0020, /* The timezones definitions */
|
||||||
|
NVRAMCLEAROPTIONS_FILTERS = 0x0040, /* Recording filters */
|
||||||
|
NVRAMCLEAROPTIONS_EVENTLOG = 0x0080, /* The event log */
|
||||||
|
NVRAMCLEAROPTIONS_USERDATA = 0x0100, /* The actual user database */
|
||||||
|
NVRAMCLEAROPTIONS_DECLINEDLOG = 0x0200, /* Declined credentials log */
|
||||||
|
NVRAMCLEAROPTIONS_ALARMLOG = 0x0400, /* Alarm log */
|
||||||
|
NVRAMCLEAROPTIONS_LRUCACHE = 0x0800, /* LRU cache for remote authorization (status, user doesn't clear explicitly) */
|
||||||
|
NVRAMCLEAROPTIONS_DBHASH = 0x1000, /* User database hash (status, user doesn't clear explicitly) */
|
||||||
|
NVRAMCLEAROPTIONS_CFGSYSTEM = 0x2000, /* Factory settable options, system variables (status, user doesn't clear explicitly) */
|
||||||
|
NVRAMCLEAROPTIONS_AVAIL4000 = 0x4000, /* Unused */
|
||||||
|
NVRAMCLEAROPTIONS_ALL = 0x7fff, /* All of the above */
|
||||||
|
NVRAMCLEAROPTIONS_USEBACKUP = 0x8000 /* If set, installer and admin options are set according from NVRAM backup (if valid) */
|
||||||
|
}
|
||||||
|
nvramClearOptions_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
NVRAMCOMMAND_BACKUP = 0, /* 0 - Backup NVRAM to backup region */
|
||||||
|
NVRAMCOMMAND_ERASE, /* 1 - Erase backup region */
|
||||||
|
NVRAMCOMMAND_RESTORE, /* 2 - Restore NVRAM from backup region */
|
||||||
|
NVRAMCOMMAND_LAST
|
||||||
|
}
|
||||||
|
nvramCommand_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
NVRAMDUMPSELECT_ALL = 0, /* 0 - Dump all */
|
||||||
|
NVRAMDUMPSELECT_PIC, /* 1 - Dump NVRAM on PIC */
|
||||||
|
NVRAMDUMPSELECT_USER, /* 2 - Dump I2C NVRAM containing user data, exceptions, exception groups, calendars, timezones */
|
||||||
|
NVRAMDUMPSELECT_EVENT, /* 3 - Dump I2C NVRAM containing event log, declined log, alarm log, LRU cache */
|
||||||
|
NVRAMDUMPSELECT_LAST
|
||||||
|
}
|
||||||
|
nvramDumpSelect_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
PEEKPOKE_READU8 = 0, /* 0 - Read 8 bit value */
|
||||||
|
PEEKPOKE_READU16, /* 1 - Read 16 bit value */
|
||||||
|
PEEKPOKE_READU24, /* 2 - Read 24 bit value */
|
||||||
|
PEEKPOKE_READU32, /* 3 - Read 32 bit value */
|
||||||
|
PEEKPOKE_READSTRING, /* 4 - Read 'n' 8 bit values */
|
||||||
|
PEEKPOKE_WRITEU8, /* 5 - Write 8 bit value */
|
||||||
|
PEEKPOKE_WRITEU16, /* 6 - Write 16 bit value */
|
||||||
|
PEEKPOKE_WRITEU24, /* 7 - Write 24 bit value */
|
||||||
|
PEEKPOKE_WRITEU32, /* 8 - Write 32 bit value */
|
||||||
|
PEEKPOKE_WRITESTRING, /* 9 - Write 'n' 8 bit values */
|
||||||
|
PEEKPOKE_LAST
|
||||||
|
}
|
||||||
|
peekPoke_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
PPMISOURCE_NONE = 0, /* 0 - PPMI came from nowhere (not set) */
|
||||||
|
PPMISOURCE_PIN, /* 1 - PPMI came from PIN */
|
||||||
|
PPMISOURCE_PROX, /* 2 - PPMI came from Prox */
|
||||||
|
PPMISOURCE_MAGCARD, /* 3 - PPMI came from mag card */
|
||||||
|
PPMISOURCE_LAST
|
||||||
|
}
|
||||||
|
ppmiSource_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
RADIOMODE_HOSTINITIATED = 0, /* 0 - DPAC in listen mode (default) */
|
||||||
|
RADIOMODE_LOCKINITIATED, /* 1 - DPAC in pass-through mode */
|
||||||
|
RADIOMODE_LAST
|
||||||
|
}
|
||||||
|
radioMode_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
RADIOTYPE_NONE = 0, /* 0 - No radio present */
|
||||||
|
RADIOTYPE_WIPORTNR, /* 1 - WiPortNR */
|
||||||
|
RADIOTYPE_DPAC80211B, /* 2 - DPAC 802.11b */
|
||||||
|
RADIOTYPE_DPAC80211BG, /* 3 - DPAC 802.11bg */
|
||||||
|
RADIOTYPE_LAST
|
||||||
|
}
|
||||||
|
radioType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
RESPONSETYPE_OK = 0, /* 0 - All is well */
|
||||||
|
RESPONSETYPE_ERROR, /* 1 - Generic error */
|
||||||
|
RESPONSETYPE_HASDATA, /* 2 - Response has data */
|
||||||
|
RESPONSETYPE_NOHANDLER, /* 3 - Command requested with no handler (internal error) */
|
||||||
|
RESPONSETYPE_NOSESSION, /* 4 - No session established */
|
||||||
|
RESPONSETYPE_BADCOMMAND, /* 5 - Bad command value */
|
||||||
|
RESPONSETYPE_BADPARAMETER, /* 6 - Bad parameter (can mean a lot of things) */
|
||||||
|
RESPONSETYPE_BADPARAMETERLEN, /* 7 - Bad parameter length (too short, too long) */
|
||||||
|
RESPONSETYPE_MISSINGPARAMETER, /* 8 - Missing parameter (something was required, what'd you forget?) */
|
||||||
|
RESPONSETYPE_DUPLICATEPARAMETER, /* 9 - Parameter supplied more than once (D'oh!) */
|
||||||
|
RESPONSETYPE_PARAMETERCONFLICT, /* 10 - Parameters conflict (usually mutually exclusive items) */
|
||||||
|
RESPONSETYPE_BADDEVICE, /* 11 - Bad device (command came from a device that's not allowed) */
|
||||||
|
RESPONSETYPE_NVRAMERROR, /* 12 - Hardware problem... */
|
||||||
|
RESPONSETYPE_NVRAMERRORNOACK, /* 13 - Hardware problem... */
|
||||||
|
RESPONSETYPE_NVRAMERRORNOACK32, /* 14 - Hardware problem... */
|
||||||
|
RESPONSETYPE_NOTI2CADDRESS, /* 15 - Illegal I2C address in i2cStart */
|
||||||
|
RESPONSETYPE_FIRMWAREERROR, /* 16 - Generic firmware upload error (can mean lots of things) */
|
||||||
|
RESPONSETYPE_DUMPINPROGRESS, /* 17 - Can't do something, a dump is in progress */
|
||||||
|
RESPONSETYPE_INTERNALERROR, /* 18 - Something Bad Happened(tm) */
|
||||||
|
RESPONSETYPE_NOTIMPLEMENTED, /* 19 - Command or function not implemented */
|
||||||
|
RESPONSETYPE_PINFORMATERROR, /* 20 - Error in formatting of PIN (non hex character) */
|
||||||
|
RESPONSETYPE_PINEXISTS, /* 21 - PIN already exists in database */
|
||||||
|
RESPONSETYPE_PINNOTFOUND, /* 22 - PIN wasn't found (actionManageUsers) */
|
||||||
|
RESPONSETYPE_USERACTIVE, /* 23 - The record for this user is active (not deleted or free) */
|
||||||
|
RESPONSETYPE_USERINACTIVE, /* 24 - The record for this user is inactive (not in use) */
|
||||||
|
RESPONSETYPE_PARENTNOTFOUND, /* 25 - Users parent couldn't be found (used internally by dbmgr.c) */
|
||||||
|
RESPONSETYPE_NOCHAIN, /* 26 - No users in chain (used internally by dbmgr.c) */
|
||||||
|
RESPONSETYPE_CAUGHTINLOOP, /* 27 - Caught in a loop somewhere */
|
||||||
|
RESPONSETYPE_EVENTFILTERED, /* 28 - Event record was filtered (eventlog.c) */
|
||||||
|
RESPONSETYPE_PAYLOADTOOLARGE, /* 29 - Message payload too large (protocol.c) */
|
||||||
|
RESPONSETYPE_ENDOFDATA, /* 30 - No more data (used internally by eventlog.c) */
|
||||||
|
RESPONSETYPE_RMTAUTHREJECTED, /* 31 - Remote authorization rejected (lockmgr.c) */
|
||||||
|
RESPONSETYPE_NVRAMVERSIONERROR, /* 32 - NVRAM version doesn't match expected value */
|
||||||
|
RESPONSETYPE_NOHARDWARE, /* 33 - Operation requested for unsupported hardware */
|
||||||
|
RESPONSETYPE_SCHEDULERCONFLICT, /* 34 - Scheduler not in correct mode for this operation */
|
||||||
|
RESPONSETYPE_NVRAMWRITEERROR, /* 35 - NVRAM write compare error */
|
||||||
|
RESPONSETYPE_DECLINEDFILTERED, /* 36 - Declined record was filtered (declinedlog.c) */
|
||||||
|
RESPONSETYPE_NECONFIGPARM, /* 37 - Non-existent configuration parameter */
|
||||||
|
RESPONSETYPE_FLASHERASEERROR, /* 38 - Error erasing FLASH */
|
||||||
|
RESPONSETYPE_FLASHWRITEERROR, /* 39 - Error writing FLASH */
|
||||||
|
RESPONSETYPE_BADNVBACKUP, /* 40 - NVBackup length doesn't match sizeof (configParametersNV_t) */
|
||||||
|
RESPONSETYPE_EARLYACK, /* 41 - Sent prior to long commands if CONFIGITEM_EARLYACK set */
|
||||||
|
RESPONSETYPE_ALARMFILTERED, /* 42 - Alarm record was filtered (alarm.c) */
|
||||||
|
RESPONSETYPE_ACVFAILURE, /* 43 - Auxiliary controller version request failure */
|
||||||
|
RESPONSETYPE_USERCHECKSUMERROR, /* 44 - User checksum value error */
|
||||||
|
RESPONSETYPE_CHECKSUMERROR, /* 45 - Generic checksum error */
|
||||||
|
RESPONSETYPE_RTCSQWFAILURE, /* 46 - RTC isn't generating square wave */
|
||||||
|
RESPONSETYPE_PRIORITYSHUTDOWN, /* 47 - Session terminated early because lock has priority over communications */
|
||||||
|
RESPONSETYPE_NOTMODIFIABLE, /* 48 - Configuration parameter is not user modifiable */
|
||||||
|
RESPONSETYPE_CANTPRESERVE, /* 49 - Can't preserve configuration (config.c, not enough space) */
|
||||||
|
RESPONSETYPE_INPASSAGEMODE, /* 50 - Lock is in passage mode, can't do remote unlock */
|
||||||
|
RESPONSETYPE_LAST,
|
||||||
|
/*
|
||||||
|
* These should not be exposed to the user
|
||||||
|
*/
|
||||||
|
RESPONSETYPE_NOREPLY, /* 51 - Do not send a reply, subroutine is posting it's own */
|
||||||
|
RESPONSETYPE_TAKEABREAK, /* 52 - Intermediate return result, when log searches taking too long */
|
||||||
|
RESPONSETYPE_DPACBLOCKS, /* 53 - PWM lock, battery powered, DPAC takes priority */
|
||||||
|
RESPONSETYPE_ACKNAKTIMEOUT, /* 54 - Added for console.c, not used in lock firmware */
|
||||||
|
RESPONSETYPE_UNKNOWNCPUSPEED /* 55 - Unknown CPU speed (utils.c, utilCalculateClockRate()) */
|
||||||
|
}
|
||||||
|
responseType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SCHEDULERTYPE_HARDON = 0, /* 0 - Radio is always on */
|
||||||
|
SCHEDULERTYPE_SIMPLE, /* 1 - Simple 'x' minutes off, 'y' seconds on scheduler */
|
||||||
|
SCHEDULERTYPE_DOM, /* 2 - Day of month scheduling */
|
||||||
|
SCHEDULERTYPE_DOW, /* 3 - Day of week scheduling */
|
||||||
|
SCHEDULERTYPE_COMMUSER, /* 4 - Only a comm user triggers power on */
|
||||||
|
SCHEDULERTYPE_HOD, /* 5 - Hour of day scheduling */
|
||||||
|
SCHEDULERTYPE_OFF, /* 6 - Nothing wakes up radio */
|
||||||
|
SCHEDULERTYPE_LAST
|
||||||
|
}
|
||||||
|
schedulerType_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TIMEZONEMODE_NORMAL = 0, /* 0 - Timezone is applied to user, no auto unlocking */
|
||||||
|
TIMEZONEMODE_EXCLUSION, /* 1 - User NOT permitted access if in this zone at this time */
|
||||||
|
TIMEZONEMODE_AUTOTIME, /* 2 - Auto unlock at the start of the TZ, lock at end */
|
||||||
|
TIMEZONEMODE_AUTOFPT, /* 3 - Unlock on first person through, lock at end */
|
||||||
|
TIMEZONEMODE_UAPM, /* 4 - Permits user activated passage mode when active */
|
||||||
|
TIMEZONEMODE_LAST
|
||||||
|
}
|
||||||
|
timeZoneMode_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
UNLOCKMODE_NORMAL = 0, /* 0 - Normal unlock (CONFIGITEM_UNLOCK_TIME duration) */
|
||||||
|
UNLOCKMODE_UNLOCK, /* 1 - Unlock, switching to passage mode */
|
||||||
|
UNLOCKMODE_LOCK, /* 2 - Lock, regardless of mode */
|
||||||
|
UNLOCKMODE_LAST
|
||||||
|
}
|
||||||
|
unlockMode_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
UPSTREAMCOMMAND_RESERVED = 0, /* 0 - Not used */
|
||||||
|
UPSTREAMCOMMAND_DEBUGMSG, /* 1 - Debug message (zero terminated) */
|
||||||
|
UPSTREAMCOMMAND_QUERYVERSION, /* 2 - Version string (zero terminated) */
|
||||||
|
UPSTREAMCOMMAND_QUERYDATETIME, /* 3 - Current date/time */
|
||||||
|
UPSTREAMCOMMAND_QUERYSERIALNUMBER, /* 5 - Serial number (MAX_SERIALNUM_LENGTH bytes) */
|
||||||
|
UPSTREAMCOMMAND_DUMPEVENTLOG, /* 6 - Event log record */
|
||||||
|
UPSTREAMCOMMAND_DUMPNVRAM, /* 7 - NVRAM dump record */
|
||||||
|
UPSTREAMCOMMAND_RMTAUTHREQUEST, /* 8 - Remote authorization request */
|
||||||
|
UPSTREAMCOMMAND_RETRIEVEUSER, /* 9 - Retrieve user record */
|
||||||
|
UPSTREAMCOMMAND_QUERYCONFIG, /* 10 - Query configuration */
|
||||||
|
UPSTREAMCOMMAND_RMTEVENTLOGRECORD, /* 11 - Remote event log record */
|
||||||
|
UPSTREAMCOMMAND_DPAC, /* 12 - DPAC related message */
|
||||||
|
UPSTREAMCOMMAND_NOTIFY, /* 14 - Notify user message */
|
||||||
|
UPSTREAMCOMMAND_MFG, /* 15 - Manufacturing data */
|
||||||
|
UPSTREAMCOMMAND_EVENTLOGWARNING, /* 16 - Event log warning level message */
|
||||||
|
UPSTREAMCOMMAND_DUMPNVRAMRLE, /* 17 - Run Length Encoded (RLE) NVRAM dump record */
|
||||||
|
UPSTREAMCOMMAND_RMTDECLINEDRECORD, /* 18 - Remote declined log record */
|
||||||
|
UPSTREAMCOMMAND_DECLINEDWARNING, /* 19 - Declined log warning level message */
|
||||||
|
UPSTREAMCOMMAND_DUMPDECLINEDLOG, /* 20 - Declined log record dump */
|
||||||
|
UPSTREAMCOMMAND_RMTALARMRECORD, /* 21 - Remote alarm log record */
|
||||||
|
UPSTREAMCOMMAND_ALARMWARNING, /* 22 - Alarm log warning level message */
|
||||||
|
UPSTREAMCOMMAND_DUMPALARMLOG, /* 23 - Alarm log record dump */
|
||||||
|
UPSTREAMCOMMAND_CONNECTSCHEDULER, /* 24 - Connection because of scheduler, contains serial number */
|
||||||
|
UPSTREAMCOMMAND_CONNECTCOMMUSER, /* 25 - Connection because of comm user, contains serial number */
|
||||||
|
UPSTREAMCOMMAND_CONNECTALARM, /* 26 - Connection because of alarm event, contains serial number */
|
||||||
|
UPSTREAMCOMMAND_DUMPDEBUGLOG, /* 27 - Debug log dump record */
|
||||||
|
UPSTREAMCOMMAND_LAST
|
||||||
|
}
|
||||||
|
upstreamCommand_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
UPSTREAMFIELD_NOTUSED = 0, /* 0 - Not used */
|
||||||
|
UPSTREAMFIELD_SERIALNUMBER, /* 1 - Contains unit serial number */
|
||||||
|
UPSTREAMFIELD_NAR, /* 2 - Contains 16 bit Next Available Record */
|
||||||
|
UPSTREAMFIELD_ENTRYDEVICE, /* 3 - Contains a ppmSource_e */
|
||||||
|
UPSTREAMFIELD_PPMIFIELDTYPE, /* 4 - Contains a type of _PIN (auxFieldType_e) */
|
||||||
|
UPSTREAMFIELD_PIN, /* 5 - Contains a PIN, Prox, mag key */
|
||||||
|
UPSTREAMFIELD_SEQUENCENUMBER, /* 6 - Contains 16 bit sequence number */
|
||||||
|
UPSTREAMFIELD_RESPONSEWINDOW, /* 7 - Contains 8 bit response window (number of seconds) */
|
||||||
|
UPSTREAMFIELD_USERNUMBER, /* 8 - Contains 16 bit user number */
|
||||||
|
UPSTREAMFIELD_VERSION, /* 9 - Contains version string */
|
||||||
|
UPSTREAMFIELD_EVENTLOGRECORD, /* 10 - Contains eventLog_e event log record */
|
||||||
|
UPSTREAMFIELD_DATETIME, /* 11 - Contains 8 byte date/time data */
|
||||||
|
UPSTREAMFIELD_EVENTLOGRECORDCOUNT, /* 17 - Contains number of event log records */
|
||||||
|
UPSTREAMFIELD_DECLINEDRECORDCOUNT, /* 20 - Contains number of declined log records */
|
||||||
|
UPSTREAMFIELD_DECLINEDRECORD, /* 21 - Contains declinedLog_t declined log record */
|
||||||
|
UPSTREAMFIELD_USERTYPE, /* 23 - Contains the user type (master, emergency, normal, etc) */
|
||||||
|
UPSTREAMFIELD_ACCESSALWAYS, /* 24 - Contains the access always mode (true, false) */
|
||||||
|
UPSTREAMFIELD_CACHED, /* 25 - Contains the cached flag (true, false) */
|
||||||
|
UPSTREAMFIELD_PRIMARYFIELDTYPE, /* 26 - Contains the primary field type (pin, prox, mag) */
|
||||||
|
UPSTREAMFIELD_AUXFIELDTYPE, /* 27 - Contains the aux field type (pin, prox, mag) */
|
||||||
|
UPSTREAMFIELD_ACCESSMODE, /* 28 - Contains the access mode (aux only, aux + pin, aux or pin, etc) */
|
||||||
|
UPSTREAMFIELD_EXPIREON, /* 29 - Contains the date the user expires on (00/00/00 if not set) */
|
||||||
|
UPSTREAMFIELD_USECOUNT, /* 30 - Contains the use count (if user type is ONE_TIME) */
|
||||||
|
UPSTREAMFIELD_TIMEZONE, /* 31 - Contains the timezone bit map */
|
||||||
|
UPSTREAMFIELD_EXCEPTIONGROUP, /* 32 - Contains the exception group */
|
||||||
|
UPSTREAMFIELD_PRIMARYPIN, /* 33 - Contains the primary PPMI (ASCII, 0 terminated) */
|
||||||
|
UPSTREAMFIELD_AUXPIN, /* 34 - Contains the aux PPMI (ASCII, 0 terminated) */
|
||||||
|
UPSTREAMFIELD_ALARMRECORDCOUNT, /* 35 - Contains number of alarm log records */
|
||||||
|
UPSTREAMFIELD_ALARMRECORD, /* 36 - Contains alarmLog_t alarm log record */
|
||||||
|
UPSTREAMFIELD_AUXCTLRVERSION, /* 37 - Contains the version number of the auxiliary controller */
|
||||||
|
UPSTREAMFIELD_LAST
|
||||||
|
}
|
||||||
|
upstreamField_e;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
USERTYPE_NONE = 0, /* 0 - No user */
|
||||||
|
USERTYPE_MASTER, /* 1 - Master user (clears panic, relock, lockout and auto open) */
|
||||||
|
USERTYPE_EMERGENCY, /* 2 - Opens door regardless of state */
|
||||||
|
USERTYPE_SUPERVISOR, /* 3 - Like emergency user, except won't unlock when in panic mode */
|
||||||
|
USERTYPE_USER, /* 4 - Generic user */
|
||||||
|
USERTYPE_EXTENDED, /* 5 - Same as _USER, but strike can be kept open longer */
|
||||||
|
USERTYPE_PASSAGE, /* 6 - Toggles strike between passage and non-passage modes */
|
||||||
|
USERTYPE_ONETIME, /* 7 - User may be used one time */
|
||||||
|
USERTYPE_PANIC, /* 8 - Locks down locks, no user except master valid */
|
||||||
|
USERTYPE_LOCKOUT, /* 9 - Locks out regular, extended, passage, one time, and notify users */
|
||||||
|
USERTYPE_RELOCK, /* 10 - Relock cancels passage mode, but can't unlock */
|
||||||
|
USERTYPE_NOTIFY, /* 11 - Same as _USER, only sends unsolicited message to server */
|
||||||
|
USERTYPE_COMM, /* 12 - Kicks a communications sessions off if not running _HARDON scheduler */
|
||||||
|
USERTYPE_SUSPENDED, /* 13 - User is suspended */
|
||||||
|
USERTYPE_LAST
|
||||||
|
}
|
||||||
|
userType_e;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wireshark ID of the R3 protocol
|
* Wireshark ID of the R3 protocol
|
||||||
|
@ -79,7 +1034,7 @@ static gint hf_r3_upstreamfieldlength = -1; /* Upstream field length */
|
||||||
static gint hf_r3_upstreamfieldtype = -1; /* Upstream field type (upstreamField_e) */
|
static gint hf_r3_upstreamfieldtype = -1; /* Upstream field type (upstreamField_e) */
|
||||||
/*static gint hf_r3_upstreamfielddatalen = -1;*/ /* Upstream field data length */
|
/*static gint hf_r3_upstreamfielddatalen = -1;*/ /* Upstream field data length */
|
||||||
static gint hf_r3_upstreamfielderror = -1; /* Upstream field is unknown type */
|
static gint hf_r3_upstreamfielderror = -1; /* Upstream field is unknown type */
|
||||||
static gint hf_r3_upstreamfieldarray [UPSTREAMFIELD_LAST];
|
static gint hf_r3_upstreamfieldarray[UPSTREAMFIELD_LAST];
|
||||||
|
|
||||||
static gint hf_r3_configitems = -1;
|
static gint hf_r3_configitems = -1;
|
||||||
static gint hf_r3_configitem = -1;
|
static gint hf_r3_configitem = -1;
|
||||||
|
|
|
@ -1,996 +0,0 @@
|
||||||
/* packet-r3_public.h
|
|
||||||
* Routines for R3 packet dissection
|
|
||||||
* Copyright (c) 2009 Assa Abloy USA <jcwren@assaabloyusa.com>
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Wireshark - Network traffic analyzer
|
|
||||||
* By Gerald Combs <gerald@wireshark.org>
|
|
||||||
* Copyright 1998 Gerald Combs
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PACKET_ASSA_R3_PUBLIC_H__
|
|
||||||
#define __PACKET_ASSA_R3_PUBLIC_H__
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* System limits */
|
|
||||||
/* */
|
|
||||||
#define MAX_USERS 2400
|
|
||||||
#define MAX_TIMEZONES 32
|
|
||||||
#define MAX_EXCEPTIONS 64
|
|
||||||
#define MAX_EXCEPTIONGROUPS 64
|
|
||||||
#define MAX_EVENTENTRIES 10000
|
|
||||||
#define MAX_DECLINEDENTRIES 500
|
|
||||||
#define MAX_ALARMENTRIES 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Enumerations
|
|
||||||
*/
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ACCESSMODE_NONE = 0, /* 0 - No access mode (not used, not legal, I think) */
|
|
||||||
ACCESSMODE_PRIMARYONLY, /* 1 - Primary only */
|
|
||||||
ACCESSMODE_PRIMARYORAUX, /* 2 - Primary or aux field */
|
|
||||||
ACCESSMODE_PRIMARYANDAUX, /* 3 - Primary and aux field */
|
|
||||||
ACCESSMODE_PRIMARYTHENAUX, /* 4 - Primary required first, then aux */
|
|
||||||
ACCESSMODE_LAST /* 5 - Dummy, for range checking */
|
|
||||||
}
|
|
||||||
accessMode_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ADDUSERPARAMTYPE_DISPOSITION = 0, /* 0 - What we're supposed to do (add, delete, etc) */
|
|
||||||
ADDUSERPARAMTYPE_USERNO, /* 1 - User to manage (user number, U16) */
|
|
||||||
ADDUSERPARAMTYPE_ACCESSALWAYS, /* 2 - Access always (boolean) */
|
|
||||||
ADDUSERPARAMTYPE_ACCESSMODE, /* 3 - Access type (accessMode_e) */
|
|
||||||
ADDUSERPARAMTYPE_CACHED, /* 4 - Entry is managed by cache system (boolean) */
|
|
||||||
ADDUSERPARAMTYPE_USERTYPE, /* 5 - User type (userType_e) */
|
|
||||||
ADDUSERPARAMTYPE_PRIMARYFIELD, /* 6 - Primary field (MAX_CREDENTIALBYTES) */
|
|
||||||
ADDUSERPARAMTYPE_PRIMARYFIELDTYPE, /* 7 - Primary field type (fieldType_e); */
|
|
||||||
ADDUSERPARAMTYPE_AUXFIELD, /* 8 - Auxiliary field (MAX_CREDENTIALBYTES) */
|
|
||||||
ADDUSERPARAMTYPE_AUXFIELDTYPE, /* 9 - Auxiliary field type (fieldType_e) */
|
|
||||||
ADDUSERPARAMTYPE_TIMEZONE, /* 10 - Timezone bitmap (U32) */
|
|
||||||
ADDUSERPARAMTYPE_EXPIREON, /* 11 - Date on which user no longer granted access, if non-0 */
|
|
||||||
ADDUSERPARAMTYPE_USECOUNT, /* 12 - Use count */
|
|
||||||
ADDUSERPARAMTYPE_EXCEPTIONGROUP, /* 13 - Exception group */
|
|
||||||
ADDUSERPARAMTYPE_LAST
|
|
||||||
}
|
|
||||||
addUserParamType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ALARMID_NONE = 0, /* 0 - No alarm */
|
|
||||||
ALARMID_VALIDIN, /* 1 - Valid entry */
|
|
||||||
ALARMID_DENIEDACCESS, /* 2 - Denied access (bad credential) */
|
|
||||||
ALARMID_SECURED, /* 3 - Door closed & secured (only seen after alarms 3 or 4) */
|
|
||||||
ALARMID_DOORFORCED, /* 4 - Door forced */
|
|
||||||
ALARMID_KEYOVERRIDE, /* 5 - Key override */
|
|
||||||
ALARMID_INVALIDENTRY, /* 6 - Door open but invalid entry (key used?) */
|
|
||||||
ALARMID_DOORAJAR, /* 7 - Door ajar (needs .ja woman with Engrish accent) */
|
|
||||||
ALARMID_LOWBATTERY, /* 8 - Low battery alarm */
|
|
||||||
ALARMID_RXHELD, /* 9 - RX held */
|
|
||||||
ALARMID_LAST
|
|
||||||
}
|
|
||||||
alarmID_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CAPABILITIES_USERS = 0, /* 0 - Number of users supported */
|
|
||||||
CAPABILITIES_TIMEZONES, /* 1 - Number of timezone supported */
|
|
||||||
CAPABILITIES_EXCEPTIONS, /* 2 - Number of exceptions supported */
|
|
||||||
CAPABILITIES_EXCEPTIONGROUPS, /* 3 - Number of exception groups supported */
|
|
||||||
CAPABILITIES_EVENTLOG, /* 4 - Number of event log entries supported */
|
|
||||||
CAPABILITIES_DECLINEDLOG, /* 5 - Number of declined log entries supported */
|
|
||||||
CAPABILITIES_ALARMLOG, /* 6 - Number of alarm log entries supported */
|
|
||||||
CAPABILITIES_TOTALEVENTS, /* 7 - Total events (EVENT_LAST - 1) */
|
|
||||||
CAPABILITIES_LAST
|
|
||||||
}
|
|
||||||
capabilities_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CHECKSUMRESULT_CONFIGURATIONNVRAM = 0, /* 0 - Checksum results of the configuration NVRAM */
|
|
||||||
CHECKSUMRESULT_EXCEPTIONS, /* 1 - Checksum results of the exceptions NVRAM */
|
|
||||||
CHECKSUMRESULT_EXCEPTIONGROUPS, /* 2 - Checksum results of the exception groups NVRAM */
|
|
||||||
CHECKSUMRESULT_TZCALENDARS, /* 3 - Checksum results of the time zone calendar NVRAM */
|
|
||||||
CHECKSUMRESULT_TIMEZONES, /* 4 - Checksum results of the time zone NVRAM */
|
|
||||||
CHECKSUMRESULT_USERS, /* 5 - Checksum results of the users NVRAM */
|
|
||||||
CHECKSUMRESULT_CACHELRU, /* 6 - Checksum results of the cache LRU */
|
|
||||||
CHECKSUMRESULT_LAST
|
|
||||||
}
|
|
||||||
checksumResult_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CMD_RESPONSE = 0, /* 0 - Response to command */
|
|
||||||
CMD_HANDSHAKE, /* 1 - Establish session */
|
|
||||||
CMD_KILLSESSION, /* 2 - Kill session */
|
|
||||||
CMD_QUERYSERIALNUMBER, /* 3 - Query serial number */
|
|
||||||
CMD_QUERYVERSION, /* 4 - Query version */
|
|
||||||
CMD_SETDATETIME, /* 5 - Set date and time */
|
|
||||||
CMD_QUERYDATETIME, /* 6 - Query date and time */
|
|
||||||
CMD_SETCONFIG, /* 7 - Set configuration options */
|
|
||||||
CMD_GETCONFIG, /* 8 - Read configuration options */
|
|
||||||
CMD_MANAGEUSER, /* 9 - Manage users (add/delete/replace/update) */
|
|
||||||
CMD_DELETEUSERS, /* 10 - Delete users (all/most/cached) */
|
|
||||||
CMD_DEFINEEXCEPTION, /* 11 - Define exception (old block holiday) */
|
|
||||||
CMD_DEFINEEXCEPTIONGROUP, /* 12 - Define exception group */
|
|
||||||
CMD_DEFINECALENDAR, /* 13 - Define calendar */
|
|
||||||
CMD_DEFINETIMEZONE, /* 14 - Define time zone */
|
|
||||||
CMD_RMTAUTHRETRY, /* 15 - Remote authorization retry */
|
|
||||||
CMD_FILTERS, /* 16 - Event log filter configuration */
|
|
||||||
CMD_ALARMCONFIGURE, /* 17 - Alarm condition configuration */
|
|
||||||
CMD_EVENTLOGDUMP, /* 18 - Dump event log */
|
|
||||||
CMD_DECLINEDLOGDUMP, /* 19 - Dump declined log */
|
|
||||||
CMD_ALARMLOGDUMP, /* 20 - Dump alarm log */
|
|
||||||
CMD_DOWNLOADFIRMWARE, /* 21 - Download firmware */
|
|
||||||
CMD_DOWNLOADFIRMWARETIMEOUT, /* 22 - Download firmware timeout (internal command only) */
|
|
||||||
CMD_POWERTABLESELECTION, /* 23 - Power table selection */
|
|
||||||
CMD_CLEARNVRAM, /* 24 - Clear nvram (config/event log/declined log/etc) */
|
|
||||||
CMD_DPAC, /* 25 - DPAC manipulation commands */
|
|
||||||
CMD_SELFTEST, /* 26 - Selftest (heh) */
|
|
||||||
CMD_RESET, /* 27 - Restart controller */
|
|
||||||
CMD_LOGWRITE, /* 28 - Write event to event log */
|
|
||||||
CMD_MFGCOMMAND, /* 29 - Manufacturing commands */
|
|
||||||
CMD_NVRAMBACKUP, /* 30 - Backup/restore/erase NVRAM */
|
|
||||||
CMD_EXTENDEDRESPONSE, /* 31 - Response to command (extended version) */
|
|
||||||
CMD_LAST
|
|
||||||
}
|
|
||||||
cmdCommand_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CMDMFG_SETSERIALNUMBER = 0, /* 0 - Set serial number */
|
|
||||||
CMDMFG_SETCRYPTKEY, /* 1 - Set encryption key */
|
|
||||||
CMDMFG_DUMPNVRAM, /* 2 - Dump NVRAM */
|
|
||||||
CMDMFG_TERMINAL, /* 3 - DPAC terminal mode */
|
|
||||||
CMDMFG_REMOTEUNLOCK, /* 4 - Remote unlock (only on 'd' builds) */
|
|
||||||
CMDMFG_AUXCTLRVERSION, /* 5 - Request version of auxiliary controller */
|
|
||||||
CMDMFG_IOPINS, /* 6 - Read I/O pin states */
|
|
||||||
CMDMFG_ADCS, /* 7 - Read ADC values */
|
|
||||||
CMDMFG_HARDWAREID, /* 8 - Read hardware ID and CPU ID */
|
|
||||||
CMDMFG_CHECKPOINTLOGDUMP, /* 9 - Dump checkpoint log */
|
|
||||||
CMDMFG_CHECKPOINTLOGCLEAR, /* 10 - Clear checkpoint log */
|
|
||||||
CMDMFG_READREGISTERS, /* 11 - Read selected CPU registers */
|
|
||||||
CMDMFG_FORCEOPTIONS, /* 12 - Force I/O lines to certain states */
|
|
||||||
CMDMFG_COMMUSER, /* 13 - Fake a comm user entry */
|
|
||||||
CMDMFG_DUMPKEYPAD, /* 14 - Dump keypad debugging buffer */
|
|
||||||
CMDMFG_BATTERYCHECK, /* 15 - Force battery check */
|
|
||||||
CMDMFG_RAMREFRESH, /* 16 - Refresh RAM variables from NVRAM */
|
|
||||||
CMDMFG_TASKFLAGS, /* 17 - Dump task flags */
|
|
||||||
CMDMFG_TIMERCHAIN, /* 18 - Dump active timer chains */
|
|
||||||
CMDMFG_PEEKPOKE, /* 19 - Peek/poke CPU RAM memory */
|
|
||||||
CMDMFG_LOCKSTATE, /* 20 - Display global gLockState variable */
|
|
||||||
CMDMFG_CAPABILITIES, /* 21 - Read firmware capabilities (# users/event log entries, etc) */
|
|
||||||
CMDMFG_DUMPM41T81, /* 22 - Dump M41T81 RTC registers */
|
|
||||||
CMDMFG_DEBUGLOGDUMP, /* 23 - Dump debugging log */
|
|
||||||
CMDMFG_DEBUGLOGCLEAR, /* 24 - Clear debugging log */
|
|
||||||
CMDMFG_TESTWDT, /* 25 - Test watchdog */
|
|
||||||
CMDMFG_QUERYCKSUM, /* 26 - Query NVRAM checksum value */
|
|
||||||
CMDMFG_VALIDATECHECKSUMS, /* 27 - Validate checksums */
|
|
||||||
CMDMFG_REBUILDLRUCACHE, /* 28 - Rebuild LRC cache */
|
|
||||||
CMDMFG_TZUPDATE, /* 29 - Send TZCHANGE to tod.c */
|
|
||||||
CMDMFG_TESTPRESERVE, /* 30 - Test preserve save/restore code */
|
|
||||||
CMDMFG_MORTISESTATELOGDUMP, /* 31 - Dump the mortise state log */
|
|
||||||
CMDMFG_MORTISESTATELOGCLEAR, /* 32 - Clear the mortise state log */
|
|
||||||
CMDMFG_MORTISEPINS, /* 33 - Display current mortise pin status */
|
|
||||||
CMDMFG_HALTANDCATCHFIRE, /* 34 - Stop processor (optionally catch fire) */
|
|
||||||
CMDMFG_LAST
|
|
||||||
}
|
|
||||||
cmdMfgCommand_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
CONFIGITEM_SERIAL_NUMBER = 0, /* 0 - Ye olde serial number */
|
|
||||||
CONFIGITEM_CRYPT_KEY, /* 1 - The encryption/decryption key */
|
|
||||||
CONFIGITEM_HARDWARE_OPTIONS_MFG, /* 2 - Bit map of hardware options at manufacturing time (hardwareOptions_e) */
|
|
||||||
CONFIGITEM_HARDWARE_OPTIONS, /* 3 - Bit map of hardware options at runtime time (hardwareOptions_e) */
|
|
||||||
CONFIGITEM_NVRAM_CHANGES, /* 4 - Log of NVRAM changes since reset (which blocks were reset) */
|
|
||||||
|
|
||||||
CONFIGITEM_NVRAMDIRTY, /* 5 - NVRAM is (or might be) dirty */
|
|
||||||
CONFIGITEM_NVRAM_WV, /* 6 - NVRAM write verify (I2C parts only) */
|
|
||||||
CONFIGITEM_ENABLE_WDT, /* 7 - If true, and OPT_WATCHDOG enabled, enables WDT */
|
|
||||||
CONFIGITEM_EARLY_ACK, /* 8 - Generates early RESPONSE_COMMANDRECEIVED message for commands that take some time */
|
|
||||||
CONFIGITEM_CONSOLE_AES_ONLY, /* 9 - If set, requires AES encryption on serial communications */
|
|
||||||
CONFIGITEM_RADIO_AES_ONLY, /* 10 - If set, requires AES encryption on radio communications */
|
|
||||||
CONFIGITEM_NDRLE, /* 11 - RLE (Run Length Encoding) NVRAM dump enable/disable */
|
|
||||||
CONFIGITEM_SOMF, /* 12 - Stop on mortise failure */
|
|
||||||
CONFIGITEM_NOGAF, /* 13 - Prevents what should be fatal errors from being fatal (i.e, No One Gives A Flip) */
|
|
||||||
CONFIGITEM_CARD_READER_POWER, /* 14 - External mag reader power supply control */
|
|
||||||
CONFIGITEM_PROX_ENABLE, /* 15 - Prox into permanent sleep mode */
|
|
||||||
CONFIGITEM_CKSUMCONFIG, /* 16 - Configuration NVRAM checksum enable/disable */
|
|
||||||
CONFIGITEM_DAILY_BATTERY_CHECK, /* 17 - Enable/disable daily battery check */
|
|
||||||
CONFIGITEM_DAILY_BATTERY_CHECK_HOUR, /* 18 - If daily battery check enabled, top of the hour to check at */
|
|
||||||
CONFIGITEM_BATTERY_LOW, /* 19 - Return low battery status (TRUE = low) */
|
|
||||||
|
|
||||||
CONFIGITEM_LRU_HEAD, /* 20 - Cache LRU head pointer */
|
|
||||||
CONFIGITEM_LRU_TAIL, /* 21 - Cache LRU tail pointer */
|
|
||||||
CONFIGITEM_RTC_CALIBRATION, /* 22 - Signed 6 bit value written to M41T81 calibration register */
|
|
||||||
CONFIGITEM_ACVREQUESTER, /* 23 - Auxiliary controller version requester (fromDevice_e, internal variable) */
|
|
||||||
CONFIGITEM_LOCAL_LED, /* 24 - Local LED function assignment */
|
|
||||||
|
|
||||||
CONFIGITEM_ERRCNT_XORLEN, /* 25 - Error counter for XOR length not matching in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_CRC, /* 26 - Error counter for bad CRC in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_NOTSIGIL, /* 27 - Error counter for character received was not sigil in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_TIMEOUT, /* 28 - Error counter for timeout in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_TOOLONG, /* 29 - Error counter for packet too long in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_TOOSHORT, /* 30 - Error counter for packet too short in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_HITDEFAULT, /* 31 - Error counter for hitting default handler in protocol.c */
|
|
||||||
CONFIGITEM_ERRCNT_OVERRUN, /* 32 - Error counter for serial buffer overrun in serial.c */
|
|
||||||
CONFIGITEM_ERRCNT_UARTFE, /* 33 - Error counter for UART framing error in serial.c */
|
|
||||||
CONFIGITEM_ERRCNT_UARTOE, /* 34 - Error counter for UART overrun error in serial.c */
|
|
||||||
|
|
||||||
CONFIGITEM_DST_SET, /* 35 - Daylight savings time currently active */
|
|
||||||
CONFIGITEM_DST_MODE, /* 36 - Determines if repeating month/date, repeating month/day, or specific month/date (dstMode_e) */
|
|
||||||
CONFIGITEM_DST_FORWARD_MONTH, /* 37 - Month to skip forward on (1-12) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_FORWARD_DOM, /* 38 - Day of month to skip forward on (1-31) (DSTMODE_REPEATINGDATE, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_FORWARD_OOD, /* 39 - Occurence number of CONFIGITEM_DST_FORWARD_DOW to skip forward on (1-5) (DSTMODE_REPEATINGDOW) */
|
|
||||||
CONFIGITEM_DST_FORWARD_DOW, /* 40 - Day of week to skip forward on (1-7) (DSTMODE_REPEATINGDOW) */
|
|
||||||
CONFIGITEM_DST_FORWARD_HOUR, /* 41 - Hour of day of month to skip forward on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_FORWARD_MINUTE, /* 42 - Hour of day of month to skip forward on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_FORWARD_ADJUST, /* 43 - Number of minutes to move forward */
|
|
||||||
CONFIGITEM_DST_BACK_MONTH, /* 44 - Month to fall back on (1-12) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDAY, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_BACK_DOM, /* 45 - Day of month to fall back on (1-31) (DSTMODE_REPEATINGDATE, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_BACK_OOD, /* 46 - Occurence number of CONFIGITEM_DST_BACK_DOW to fall back on (1-5) (DSTMODE_REPEATINGDOW) */
|
|
||||||
CONFIGITEM_DST_BACK_DOW, /* 47 - Day of week to fall back on (1-7) (DSTMODE_REPEATINGDATE, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_BACK_HOUR, /* 48 - Hour of day of month to fall back on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_BACK_MINUTE, /* 49 - Hour of day of month to fall back on (0-23) (DSTMODE_REPEATINGDATE, DSTMODE_REPEATINGDOW, DSTMODE_ONETIMEDATE) */
|
|
||||||
CONFIGITEM_DST_BACK_ADJUST, /* 50 - Number of minutes to move backwards */
|
|
||||||
|
|
||||||
CONFIGITEM_EVENTLOG_ZEROMEM, /* 51 - If set, event log memory is zeroed when event log cleared */
|
|
||||||
CONFIGITEM_EVENTLOG_BEGIN, /* 52 - Beginning record number when event log cleared */
|
|
||||||
CONFIGITEM_EVENTLOG_RECORD, /* 53 - Next event log record to write */
|
|
||||||
CONFIGITEM_EVENTLOG_ENTRIES, /* 54 - Number of entries in event log */
|
|
||||||
CONFIGITEM_EVENTLOG_WARNDEVICE, /* 55 - Event log warning device */
|
|
||||||
CONFIGITEM_EVENTLOG_WARNEVERY, /* 56 - Warn at every 'n' records (more or less) */
|
|
||||||
CONFIGITEM_EVENTLOG_RMTDEVICE, /* 57 - Device event log entries copied to (fromDevice_e) */
|
|
||||||
|
|
||||||
CONFIGITEM_DECLINEDLOG_ZEROMEM, /* 58 - If set, declined log memory is zeroed when declined log cleared */
|
|
||||||
CONFIGITEM_DECLINEDLOG_BEGIN, /* 59 - Beginning record number when declined log cleared */
|
|
||||||
CONFIGITEM_DECLINEDLOG_RECORD, /* 60 - Next declined log record to write */
|
|
||||||
CONFIGITEM_DECLINEDLOG_ENTRIES, /* 61 - Number of entries in declined log */
|
|
||||||
CONFIGITEM_DECLINEDLOG_WARNDEVICE, /* 62 - Declined record warning device */
|
|
||||||
CONFIGITEM_DECLINEDLOG_WARNEVERY, /* 63 - Warn at every 'n' records (more or less) */
|
|
||||||
CONFIGITEM_DECLINEDLOG_RMTDEVICE, /* 64 - Device declined entries copied to (fromDevice_e) */
|
|
||||||
|
|
||||||
CONFIGITEM_ALARMLOG_ZEROMEM, /* 65 - If set, alarm log memory is zeroed when alarm log cleared */
|
|
||||||
CONFIGITEM_ALARMLOG_BEGIN, /* 66 - Beginning record number when alarm log cleared */
|
|
||||||
CONFIGITEM_ALARMLOG_RECORD, /* 67 - Next alarm log record to write */
|
|
||||||
CONFIGITEM_ALARMLOG_ENTRIES, /* 68 - Number of entries in alarm log */
|
|
||||||
CONFIGITEM_ALARMLOG_WARNDEVICE, /* 69 - Alarm record warning device */
|
|
||||||
CONFIGITEM_ALARMLOG_WARNEVERY, /* 70 - Warn at every 'n' records (more or less) */
|
|
||||||
CONFIGITEM_ALARMLOG_RMTDEVICE, /* 71 - Device alarm entries copied to (fromDevice_e) */
|
|
||||||
|
|
||||||
CONFIGITEM_VISIBLE_FEEDBACK, /* 72 - Visible feedback on keypad presses enabled */
|
|
||||||
CONFIGITEM_AUDIBLE_FEEDBACK, /* 73 - Audible feedback on keypad presses enabled */
|
|
||||||
CONFIGITEM_VISIBLE_INDICATORS, /* 74 - Visible indicators on all actions (run dark) */
|
|
||||||
CONFIGITEM_AUDIBLE_INDICATORS, /* 75 - Audible indicators on all actions (run silent) */
|
|
||||||
CONFIGITEM_2NDPINDURATION, /* 76 - Number of seconds to wait for second PIN */
|
|
||||||
CONFIGITEM_LOCKOUT_ATTEMPTS, /* 77 - Number of pin/prox/magcard attempts before lockout */
|
|
||||||
CONFIGITEM_LOCKOUT_DURATION, /* 78 - Duration of lockout, in penta-seconds */
|
|
||||||
CONFIGITEM_KEYPAD_INACTIVITY, /* 79 - Duration in seconds with no key entries before key buffer cleared */
|
|
||||||
CONFIGITEM_ICIDLE_DURATION, /* 80 - If last credential was invalid, invalid attempt counter reset after this many seconds */
|
|
||||||
CONFIGITEM_WRITE_DECLINED_LOG, /* 81 - Declined log writing enable/disable */
|
|
||||||
CONFIGITEM_LOW_BATTERY_INDICATOR, /* 82 - Low battery audio/visual indicator enable/disable */
|
|
||||||
|
|
||||||
CONFIGITEM_PANIC_MODE, /* 83 - Enable/disable panic mode */
|
|
||||||
|
|
||||||
CONFIGITEM_TIMEZONE_ENABLE, /* 84 - Timezones enabled (applies to users, not passage modes) */
|
|
||||||
CONFIGITEM_EXCEPTION_ENABLE, /* 85 - Exceptions enabled (applies to users and passage modes) */
|
|
||||||
CONFIGITEM_AUTOUNLOCK_ENABLE, /* 86 - Auto-unlocking (schedule based) enabled */
|
|
||||||
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_EMERGENCY, /* 87 - DPAC/PWM lock priority for emergency users (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_SUPERVISOR, /* 88 - DPAC/PWM lock priority for supervisors (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_USER, /* 89 - DPAC/PWM lock priority for users (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_PASSAGE, /* 90 - DPAC/PWM lock priority for passage mode (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_PANIC, /* 91 - DPAC/PWM lock priority for panic mode/panic users (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_LOCKOUT, /* 92 - DPAC/PWM lock priority for remote unlock (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_RELOCK, /* 93 - DPAC/PWM lock priority for remote unlock (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_BOLTTHROWN, /* 94 - DPAC/PWM lock priority for bolt thrown (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_CONFIGCHANGE, /* 95 - DPAC/PWM lock priority for configuration change (CONFIGITEM_LOCK_TYPE) (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_PRIORITY_REMOTE, /* 96 - DPAC/PWM lock priority for remote unlock (lockPriority_e) */
|
|
||||||
CONFIGITEM_LOCK_TYPE, /* 97 - Type of lock (PWM, electric, magnetic) */
|
|
||||||
CONFIGITEM_DOUBLE_PULSE, /* 98 - Lock double pulse enabled */
|
|
||||||
CONFIGITEM_DOUBLE_DELAY, /* 99 - Delay between double pulses, in centiseconds */
|
|
||||||
CONFIGITEM_MOTOR_DURATION, /* 100 - Duration lock motor to run, in centiseconds */
|
|
||||||
CONFIGITEM_MORTISE_TYPE, /* 101 - Type of mortise connected to controller */
|
|
||||||
CONFIGITEM_UNLOCK_TIME, /* 102 - Normal unlock duration in seconds */
|
|
||||||
CONFIGITEM_EXT_UNLOCK_TIME, /* 103 - Extended unlock duration, in seconds */
|
|
||||||
CONFIGITEM_DOOR_AJAR_TIME, /* 104 - Time before door considered stuck open, in seconds */
|
|
||||||
|
|
||||||
CONFIGITEM_SESSION_TIMEOUT, /* 105 - Session timeout, in seconds */
|
|
||||||
CONFIGITEM_RETRY_ON_TIMEOUT, /* 106 - Retry lock-initiated sessions if comm session timed out (instead of terminated by remote end) */
|
|
||||||
|
|
||||||
CONFIGITEM_UNSOLICITED_ENCRYPT, /* 107 - Unsolicited messages are encrypted (encryptionScheme_e) */
|
|
||||||
CONFIGITEM_RMT_AUTH_TIMEOUT, /* 108 - Seconds to wait for remote authorization timeout (0 = no remote auth) */
|
|
||||||
CONFIGITEM_RMT_AUTH_DEVICE, /* 109 - Device remote authorization requests sent over (fromDevice_e) */
|
|
||||||
CONFIGITEM_ALARM_DEVICE, /* 110 - Device alarm condition connects via */
|
|
||||||
CONFIGITEM_NOTIFY_DEVICE, /* 111 - Notify user device */
|
|
||||||
CONFIGITEM_COMMUSER_DEVICE, /* 112 - Device comm user connects via */
|
|
||||||
CONFIGITEM_SCHEDULER_DEVICE, /* 113 - Device scheduler connects via */
|
|
||||||
|
|
||||||
CONFIGITEM_SCHEDULER_TYPE, /* 114 - Scheduling algorithm to use (schedulerType_e) */
|
|
||||||
CONFIGITEM_SCHEDULER_AWAKE, /* 115 - Number of decaseconds scheduler is awake for */
|
|
||||||
CONFIGITEM_SCHEDULER_PERIOD, /* 116 - Interval in minutes between scheduled wakeups (SCHEDULERTYPE_SIMPLE) */
|
|
||||||
CONFIGITEM_SCHEDULER_HOD, /* 117 - Hour of day map (SCHEDULERTYPE_HOD) */
|
|
||||||
CONFIGITEM_SCHEDULER_DOW, /* 118 - Day of month map (SCHEDULERTYPE_DOW) */
|
|
||||||
CONFIGITEM_SCHEDULER_DOM, /* 119 - Day of month map (SCHEDULERTYPE_DOM) */
|
|
||||||
CONFIGITEM_SCHEDULER_HM1, /* 120 - On at hour:minute #1 */
|
|
||||||
CONFIGITEM_SCHEDULER_HM2, /* 121 - On at hour:minute #2 */
|
|
||||||
CONFIGITEM_SCHEDULER_HM3, /* 122 - On at hour:minute #3 */
|
|
||||||
CONFIGITEM_SCHEDULER_HM4, /* 123 - On at hour:minute #4 */
|
|
||||||
|
|
||||||
CONFIGITEM_RADIO_TYPE, /* 124 - Radio type (None, DPAC, WiPort, etc) */
|
|
||||||
CONFIGITEM_RADIO_MODE, /* 125 - Radio mode (DPAC=active/passive) */
|
|
||||||
CONFIGITEM_RADIO_TIMEOUT, /* 126 - Number of seconds before we decide server didn't hear us (only in RADIOMODE_LOCKINITIATED) */
|
|
||||||
CONFIGITEM_RADIO_ATTEMPTS, /* 127 - Number of times to attempt connection to server (only in RADIOMODE_LOCKINITIATED) */
|
|
||||||
CONFIGITEM_RADIO_HOUSEKEEPING, /* 128 - Time we allow for radio housekeeping (associate with AP, etc) */
|
|
||||||
CONFIGITEM_RADIO_LEAPUSERNAME, /* 129 - LEAP username */
|
|
||||||
CONFIGITEM_RADIO_LEAPPASSWORD, /* 130 - LEAP password */
|
|
||||||
|
|
||||||
CONFIGITEM_INHIBIT_VOLTAGE, /* 131 - Voltage when battery is considered dead */
|
|
||||||
CONFIGITEM_LOW_VOLTAGE, /* 132 - Voltage when battery is considered low */
|
|
||||||
CONFIGITEM_PT_RANGE_1, /* 133 - Power table for 0.00 to 5.99 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_2, /* 134 - Power table for 6.00 to 6.49 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_3, /* 135 - Power table for 6.50 to 6.99 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_4, /* 136 - Power table for 7.00 to 7.49 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_5, /* 137 - Power table for 7.50 to 7.99 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_6, /* 138 - Power table for 8.00 to 8.49 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_7, /* 139 - Power table for 8.50 to 8.99 volts */
|
|
||||||
CONFIGITEM_PT_RANGE_8, /* 140 - Power table for 9.00 and up volts */
|
|
||||||
|
|
||||||
CONFIGITEM_MAGCARD_IFS, /* 141 - Include field separator character in returned data */
|
|
||||||
CONFIGITEM_MAGCARD_FIELDS, /* 142 - Mag card fields to include */
|
|
||||||
CONFIGITEM_MAGCARD_OFFSET, /* 143 - Offset into concatenated field */
|
|
||||||
CONFIGITEM_MAGCARD_DIGITS, /* 144 - Number of digits to return past offset */
|
|
||||||
|
|
||||||
CONFIGITEM_ALARMS, /* 145 - Alarms (not writable) */
|
|
||||||
CONFIGITEM_FILTERS, /* 146 - Event filter storage (not writable) */
|
|
||||||
CONFIGITEM_ALARMSTATE, /* 147 - Current alarm state (alarmID_e) */
|
|
||||||
CONFIGITEM_DOORSTATE, /* 148 - Current door state (doorState_e) */
|
|
||||||
|
|
||||||
CONFIGITEM_DPACDEBUG, /* 149 - Enable DPAC debug events to event log */
|
|
||||||
CONFIGITEM_FAILOPENSECURE, /* 150 - Fail open (false) or secure (true) on battery dead */
|
|
||||||
|
|
||||||
CONFIGITEM_REPLACED_VOLTAGE, /* 151 - If battery above this voltage, it's been replaced */
|
|
||||||
|
|
||||||
CONFIGITEM_RX_HELD_TIME, /* 152 - If RX held longer than this, sent RX held alarm */
|
|
||||||
CONFIGITEM_PACKET_TIMEOUT, /* 153 - Time (in seconds) that a complete packet must arrive in */
|
|
||||||
|
|
||||||
CONFIGITEM_EXTENDEDRESPONSE, /* 154 - Enables extended response (which includes original sequence number) */
|
|
||||||
CONFIGITEM_PASSAGEMODEINDICATOR, /* 155 - When lock in passage mode, LEDs show denied if set, granted if cleared (Squish #1133) */
|
|
||||||
|
|
||||||
CONFIGITEM_PFMRETURNTIME, /* 156 - Number of seconds power must be present to exit power fail death loop */
|
|
||||||
|
|
||||||
CONFIGITEM_LAST, /* Must be last item defined (All non-virtual items added above) */
|
|
||||||
|
|
||||||
CONFIGITEM_MAGIC_FIRST = 239, /* Next item is first magic command */
|
|
||||||
CONFIGITEM_MAGIC_USERFIELD, /* 240 - Virtual command to delete PIN '8989', add user '8989' */
|
|
||||||
CONFIGITEM_MAGIC_USERADD, /* 241 - Virtual command to add a user (PIN only) */
|
|
||||||
CONFIGITEM_MAGIC_USERDELETE, /* 242 - Virtual command to delete a user */
|
|
||||||
CONFIGITEM_MAGIC_NVRAMBACKUP, /* 243 - Virtual command to backup NVRAM to FLASH */
|
|
||||||
CONFIGITEM_MAGIC_NVRAMRESTORE, /* 244 - Virtual command to restore NVRAM from FLASH */
|
|
||||||
CONFIGITEM_MAGIC_NVRAMERASE, /* 245 - Virtual command to erase backed-up NVRAM */
|
|
||||||
CONFIGITEM_MAGIC_LAST /* *Really* the last item */
|
|
||||||
}
|
|
||||||
configItem_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DELETEUSERS_ALL = 0, /* 0 - Delete ALL users, including master and emergency, restores default users */
|
|
||||||
DELETEUSERS_CACHED, /* 1 - Delete only cached users */
|
|
||||||
DELETEUSERS_LAST
|
|
||||||
}
|
|
||||||
deleteUsers_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DISPOSITION_ADD = 0, /* 0 - Add, must not exist (by user number only) */
|
|
||||||
DISPOSITION_REPLACE, /* 1 - Replace, (add, but overwrite if necessary) */
|
|
||||||
DISPOSITION_UPDATE, /* 2 - Update, must already exist */
|
|
||||||
DISPOSITION_DELETE, /* 3 - Delete, exists or not is irrelevant */
|
|
||||||
DISPOSITION_RETRIEVE, /* 4 - Retrieve, must exist */
|
|
||||||
DISPOSITION_LAST
|
|
||||||
}
|
|
||||||
disposition_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DOORSTATE_NONE = 0, /* 0 - No door state available */
|
|
||||||
DOORSTATE_SECURED, /* 1 - Door closed & secured */
|
|
||||||
DOORSTATE_DOORFORCED, /* 2 - Door forced */
|
|
||||||
DOORSTATE_KEYOVERRIDE, /* 3 - Key override */
|
|
||||||
DOORSTATE_DOORAJAR, /* 4 - Door ajar */
|
|
||||||
DOORSTATE_LAST
|
|
||||||
}
|
|
||||||
doorState_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DSTMODE_NONE, /* 0 - Automatic DST switching disabled */
|
|
||||||
DSTMODE_REPEATINGDOM, /* 1 - Particular day on a particular month (Apr 2nd) */
|
|
||||||
DSTMODE_REPEATINGDOW, /* 2 - Day of week on a particular week of a particular month (Sunday of last week of April) */
|
|
||||||
DSTMODE_ONETIMEDOM, /* 3 - Like DSTMODE_REPEATINGDOM, but clears CONFIGITEM_DST_[FORWARD|BACK][MONTH|DAY] items */
|
|
||||||
DSTMODE_ONETIMEDOW, /* 4 - Like DSTMODE_REPEATINGDOW, but clears CONFIGITEM_DST_[FORWARD|BACK][MONTH|OOD|DOW] items */
|
|
||||||
DSTMODE_LAST
|
|
||||||
}
|
|
||||||
dstMode_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
ENCRYPTIONSCHEME_NONE = 0, /* 0 - No encryption */
|
|
||||||
ENCRYPTIONSCHEME_ROLLING, /* 1 - XOR with crypt key, shift each byte */
|
|
||||||
ENCRYPTIONSCHEME_SN, /* 2 - XOR with serial number, shift each byte */
|
|
||||||
ENCRYPTIONSCHEME_AESIV, /* 3 - AES implementation (set initial vector) */
|
|
||||||
ENCRYPTIONSCHEME_AES, /* 4 - AES implementation */
|
|
||||||
ENCRYPTIONSCHEME_LAST
|
|
||||||
}
|
|
||||||
encryptionScheme_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
EVENT_INVALIDPIN = 0, /* 0 - Entered PIN was invalid */
|
|
||||||
EVENT_USER, /* 1 - Regular user has been granted access */
|
|
||||||
EVENT_ONETIME, /* 2 - One-time user has been granted access */
|
|
||||||
EVENT_PASSAGEBEGIN, /* 3 - Lock has unlocked because of auto-unlock mode */
|
|
||||||
EVENT_PASSAGEEND, /* 4 - Lock has relocked because of auto-unlock mode */
|
|
||||||
EVENT_BADTIME, /* 5 - Access attempted outside of allowed time/date */
|
|
||||||
EVENT_LOCKEDOUT, /* 6 - Access attempted during panic or lockout */
|
|
||||||
EVENT_LOWBATTERY, /* 7 - Battery is low */
|
|
||||||
EVENT_DEADBATTERY, /* 8 - Battery is dead */
|
|
||||||
EVENT_BATTERYREPLACED, /* 9 - Battery has been replaced */
|
|
||||||
EVENT_USERADDED, /* 10 - User added or changed */
|
|
||||||
EVENT_USERDELETED, /* 11 - User deleted */
|
|
||||||
EVENT_EMERGENCY, /* 12 - The emergency code was entered */
|
|
||||||
EVENT_PANIC, /* 13 - Somebody pushed the panic button */
|
|
||||||
EVENT_RELOCK, /* 14 - Relock code was entered */
|
|
||||||
EVENT_LOCKOUTBEGIN, /* 15 - Lockout code was entered */
|
|
||||||
EVENT_LOCKOUTEND, /* 16 - Lockout code was entered again */
|
|
||||||
EVENT_RESET, /* 17 - Lock was reset (restarted) */
|
|
||||||
EVENT_DATETIMESET, /* 18 - System date & time was set */
|
|
||||||
EVENT_LOGCLEARED, /* 19 - Event log cleared */
|
|
||||||
EVENT_DBRESET, /* 20 - User database reset */
|
|
||||||
EVENT_COMMSTARTED, /* 21 - Communications session started */
|
|
||||||
EVENT_COMMENDED, /* 22 - Communications session ended */
|
|
||||||
EVENT_FIRMWAREABORT, /* 23 - A firmware update aborted */
|
|
||||||
EVENT_FIRMWAREERROR, /* 24 - A firmware update encountered an error */
|
|
||||||
EVENT_FIRMWARETIMEOUT, /* 25 - Timeout expecting firmware download data record */
|
|
||||||
EVENT_DSTFALLBACK, /* 26 - Clock set back */
|
|
||||||
EVENT_DSTSPRINGFORWARD, /* 27 - Clock set forward */
|
|
||||||
EVENT_BOLTTHROWN, /* 28 - Bolt thrown */
|
|
||||||
EVENT_BOLTRETRACTED, /* 29 - Bolt retracted */
|
|
||||||
EVENT_MASTERCODE, /* 30 - Master code entered (clears panic, relock, and lockout) */
|
|
||||||
EVENT_COMMUSER, /* 31 - A comm user was activated */
|
|
||||||
EVENT_DPACDISABLED, /* 32 - DPAC disabled */
|
|
||||||
EVENT_NOTIFY, /* 33 - Notify user has been granted access */
|
|
||||||
EVENT_EXPIRED, /* 34 - Expired user attempted access */
|
|
||||||
EVENT_SUPERVISOR, /* 35 - The supervisor code was entered */
|
|
||||||
EVENT_MCCENTER, /* 36 - Entered MCC programming mode */
|
|
||||||
EVENT_MCCEXIT, /* 37 - Exited MCC programming mode */
|
|
||||||
EVENT_SERIALRXOVERRUN, /* 38 - Serial receiver overrun */
|
|
||||||
EVENT_DPACRXOVERRUN, /* 39 - DPAC receiver overrun */
|
|
||||||
EVENT_NVRAMPBCLEAR, /* 40 - NVRAM cleared by pushybutton */
|
|
||||||
EVENT_NVRAMLAYOUTCHANGE, /* 41 - NVRAM cleared by revision */
|
|
||||||
EVENT_NVRAMOK, /* 42 - NVRAM wasn't changed */
|
|
||||||
EVENT_USERREPLACED, /* 43 - User replaced */
|
|
||||||
EVENT_RADIOTIMEOUT, /* 44 - Radio timed out waiting for remote login */
|
|
||||||
EVENT_SUSPENDEDUSER, /* 45 - Suspended user attempted access */
|
|
||||||
EVENT_USERUPDATED, /* 46 - User updated */
|
|
||||||
EVENT_DOORBOLTED, /* 47 - Access denied because door is bolted */
|
|
||||||
EVENT_PANICACTIVE, /* 48 - Access denied because lock is in panic mode */
|
|
||||||
EVENT_PASSAGEACTIVE, /* 49 - Access denied because lock is in passage mode */
|
|
||||||
EVENT_PASSAGEINACTIVE, /* 50 - Access denied because lock is not in passage mode */
|
|
||||||
EVENT_BADACCESSMODE, /* 51 - Access denied because access mode is wierd */
|
|
||||||
EVENT_CLOCKERR, /* 52 - Error reading RTC */
|
|
||||||
EVENT_REMOTEUNLOCK, /* 53 - Remote unlock */
|
|
||||||
EVENT_TZHAUDISABLED, /* 54 - Time zone, exceptions, and auto-unlock functionality disabled */
|
|
||||||
EVENT_EVENTLOGWRAPPED, /* 55 - Event log wrapped */
|
|
||||||
EVENT_DECLINEDLOGWRAPPED, /* 56 - Declined log wrapped */
|
|
||||||
EVENT_ALARMLOGWRAPPED, /* 57 - Alarm log wrapped */
|
|
||||||
EVENT_RADIOBUSYEMERGENCY, /* 58 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYSUPERVISOR, /* 59 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYONETIME, /* 60 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYUSER, /* 61 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYPANIC, /* 62 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYREX, /* 63 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYLOCKOUT, /* 64 - Access denied because radio is busy */
|
|
||||||
EVENT_RADIOBUSYRELOCK, /* 65 - Access denied because radio is busy */
|
|
||||||
EVENT_BATTERYCHECKHELDOFF, /* 66 - Battery check was not performed (user number says why) */
|
|
||||||
EVENT_RMTAUTHREQUEST, /* 67 - Remote authorization request made */
|
|
||||||
EVENT_FIRMWAREUPDATE, /* 68 - A firmware update was attempted, and succeeded */
|
|
||||||
EVENT_FIRMWAREUPDATEFAILED, /* 69 - A firmware update was attempted, and failed */
|
|
||||||
EVENT_MSMFAILURE, /* 70 - Mortise state machine failure */
|
|
||||||
EVENT_CLOCKRESET, /* 71 - The RTC was reset, likely due to ESD */
|
|
||||||
EVENT_POWERFAIL, /* 72 - Power Fail Monitor (PFM) circuit triggered */
|
|
||||||
EVENT_DPAC501WENTSTUPID, /* 73 - DPAC-501 failed to release CTS on power up */
|
|
||||||
/*
|
|
||||||
* These are all internal debugging events. Real events should go before these.
|
|
||||||
*/
|
|
||||||
EVENT_CHECKSUMCONFIG, /* 74 - Performing checksum on configuration NVRAM */
|
|
||||||
EVENT_CHECKSUMTZ, /* 75 - Performing checksum on timezone data NVRAM */
|
|
||||||
EVENT_DEBUG, /* 76 - Debug event, could mean anything (programmer discretion) */
|
|
||||||
EVENT_LAST /* 77 - Everything must go before this entry */
|
|
||||||
}
|
|
||||||
event_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FIELDTYPE_NONE = 0, /* 0 - Field contains nothing */
|
|
||||||
FIELDTYPE_PIN, /* 1 - Field contains PIN */
|
|
||||||
FIELDTYPE_PROX, /* 2 - Field contains Prox card */
|
|
||||||
FIELDTYPE_MAGCARD, /* 3 - Field contains mag card */
|
|
||||||
FIELDTYPE_LAST
|
|
||||||
}
|
|
||||||
fieldType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FILTERMODE_NORMAL = 0, /* 0 - Filters events specified */
|
|
||||||
FILTERMODE_INVERT, /* 1 - Filters events not specified */
|
|
||||||
FILTERMODE_LAST
|
|
||||||
}
|
|
||||||
filterMode_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FILTERSELECT_RECORDING = 0, /* 0 - Recording filters */
|
|
||||||
FILTERSELECT_REPORTING, /* 1 - Reporting filters */
|
|
||||||
FILTERSELECT_LAST
|
|
||||||
}
|
|
||||||
filterSelect_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FORCEITEM_RADIOPOWER = 0, /* 0 - Radio power */
|
|
||||||
FORCEITEM_RADIOENABLE, /* 1 - Radio enable */
|
|
||||||
FORCEITEM_LEDRED, /* 2 - Red keypad LED */
|
|
||||||
FORCEITEM_LEDGREEN, /* 3 - Green keypad LED */
|
|
||||||
FORCEITEM_LEDYELLOW, /* 4 - Yellow keypad LED */
|
|
||||||
FORCEITEM_PIEZO, /* 5 - Keypad peizo */
|
|
||||||
FORCEITEM_MAGPOWER, /* 6 - Mag card reader power supply */
|
|
||||||
FORCEITEM_MAGLEDA, /* 7 - Mag card LED A (usually red) */
|
|
||||||
FORCEITEM_MAGLEDB, /* 8 - Mag card LED B (usually green) */
|
|
||||||
FORCEITEM_PROXPOWER, /* 13 - Prox circuitry power (opamps, etc) */
|
|
||||||
FORCEITEM_PROXPING, /* 14 - Prox PIC12F629 ping/sleep mode */
|
|
||||||
FORCEITEM_PROXMODE, /* 15 - Prox ping/read mode (selects 50hz/125KHz filters) */
|
|
||||||
FORCEITEM_I2CPOWER, /* 16 - I2C power */
|
|
||||||
FORCEITEM_MOTORARUN, /* 17 - Motor A run (to H-bridge) */
|
|
||||||
FORCEITEM_MOTORBRUN, /* 18 - Motor B run (to H-bridge) */
|
|
||||||
FORCEITEM_VMON, /* 19 - VMon (ADC 0 battery sense) */
|
|
||||||
FORCEITEM_PROX, /* 20 - Prox test mode (continuous 125KHz read) */
|
|
||||||
FORCEITEM_MORTISETEST, /* 21 - Force mortise into test mode */
|
|
||||||
FORCEITEM_KEYPADTEST, /* 22 - Force keypad into test mode */
|
|
||||||
FORCEITEM_MAGTEST, /* 23 - Force mag card test mode */
|
|
||||||
FORCEITEM_PROXTEST, /* 24 - Force prox card test mode */
|
|
||||||
FORCEITEM_ICLASSPOWER, /* 25 - iClass Prox power */
|
|
||||||
FORCEITEM_ICLASSRESET, /* 26 - iClass Prox reset */
|
|
||||||
FORCEITEM_LAST
|
|
||||||
}
|
|
||||||
forceItem_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
FROMDEVICE_NONE = 0, /* 0 - Used to indicate no device */
|
|
||||||
FROMDEVICE_INTERNAL, /* 1 - Generated internally */
|
|
||||||
FROMDEVICE_KEYPAD, /* 2 - Generated from keypad */
|
|
||||||
FROMDEVICE_CONSOLE, /* 3 - Generated from console */
|
|
||||||
FROMDEVICE_WIFI, /* 4 - Generated from wi-fi (DPAC) */
|
|
||||||
FROMDEVICE_LAST
|
|
||||||
}
|
|
||||||
fromDevice_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
HARDWAREOPTIONS_NONE = 0x0000, /* No options installed (?!) */
|
|
||||||
HARDWAREOPTIONS_CLOCK = 0x0001, /* Has RTC installed (always set) */
|
|
||||||
HARDWAREOPTIONS_CONSOLE = 0x0002, /* Has serial console (always set) */
|
|
||||||
HARDWAREOPTIONS_KEYPAD = 0x0004, /* Has keypad installed */
|
|
||||||
HARDWAREOPTIONS_PROXREADER = 0x0008, /* Has Prox card circuitry installed */
|
|
||||||
HARDWAREOPTIONS_MAGREADER = 0x0010, /* Has magnetic card reader attached */
|
|
||||||
HARDWAREOPTIONS_1WIRE = 0x0020, /* Has Dallas 1-wire interface installed */
|
|
||||||
HARDWAREOPTIONS_WIFI = 0x0040, /* Has WiFi module installed (DPAC only, for now) */
|
|
||||||
HARDWAREOPTIONS_RS485 = 0x0080, /* Has RS-485 optioning (RS-232 assumed if not) */
|
|
||||||
HARDWAREOPTIONS_IR = 0x0100, /* Has IR LED communications interface installed */
|
|
||||||
HARDWAREOPTIONS_PUSHBUTTON = 0x0200, /* Has MCC pushbutton */
|
|
||||||
HARDWAREOPTIONS_WATCHDOG = 0x0400, /* Has watchdog option compiled in */
|
|
||||||
HARDWAREOPTIONS_ICLASSREADER = 0x0800, /* Has iClass OEM75 prox reader installed */
|
|
||||||
HARDWAREOPTIONS_AVAIL1000 = 0x1000, /* Not defined */
|
|
||||||
HARDWAREOPTIONS_AVAIL2000 = 0x2000, /* Not defined */
|
|
||||||
HARDWAREOPTIONS_AVAIL4000 = 0x4000, /* Not defined */
|
|
||||||
HARDWAREOPTIONS_AVAIL8000 = 0x8000, /* Not defined */
|
|
||||||
|
|
||||||
HARDWAREOPTIONS_RADIO = (HARDWAREOPTIONS_WIFI),
|
|
||||||
|
|
||||||
HARDWAREOPTIONS_LAST = 0xffff /* Place holder, don't use */
|
|
||||||
}
|
|
||||||
hardwareOptions_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
LOCALLED_NONE = 0, /* 0 - No assignment */
|
|
||||||
LOCALLED_RADIOPOWER, /* 1 - Follows radio power supply (lit=power on) */
|
|
||||||
LOCALLED_LOCKUNLOCKED, /* 2 - Follows strike state (lit=locked) */
|
|
||||||
LOCALLED_I2CPOWER, /* 3 - Follows I2C power (lit=power on) */
|
|
||||||
LOCALLED_AUTHCONSOLE, /* 4 - Follows authorization from console port (lit=authorized) */
|
|
||||||
LOCALLED_AUTHWIFI, /* 5 - Follows authorization from Wifi port (lit=authorized) */
|
|
||||||
LOCALLED_BATTERYLOW, /* 6 - Follows battery low status (lit=low) */
|
|
||||||
LOCALLED_BATTERYDEAD, /* 7 - Follows battery dead status (lit=battery dead) */
|
|
||||||
LOCALLED_PROXREADY, /* 8 - Follows Prox ready to read (lit=ready) */
|
|
||||||
LOCALLED_APACQUIRED, /* 9 - Follows WAP acquired via DPAC (lit=acquired) */
|
|
||||||
LOCALLED_PASSMODE, /* 10 - Follows DPAC entering pass mode (lit=pass mode successful) */
|
|
||||||
LOCALLED_PROXREAD, /* 11 - Follows receiving a prox read event (PROXCARDEVENT_READCARD) */
|
|
||||||
LOCALLED_CONNECTED, /* 12 - Follows the DPAC interrupt line, indicating connection status */
|
|
||||||
LOCALLED_DPACCTSTIMER, /* 13 - Follows DPAC CTS line, if asserted more than 5 seconds */
|
|
||||||
LOCALLED_PFMCHARGING, /* 14 - Follows the state of the PFM super-cap charger */
|
|
||||||
LOCALLED_LAST
|
|
||||||
}
|
|
||||||
localLED_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
LOCKPRIORITY_NONE = 0, /* 0 - Radio is not shut down for motor run, access not denied if radio is on */
|
|
||||||
LOCKPRIORITY_DPAC, /* 1 - Radio is not shut down for motor run, access denied if radio is on */
|
|
||||||
LOCKPRIORITY_LOCK, /* 2 - Radio is shut down for motor run, access not denied if radio is on */
|
|
||||||
LOCKPRIORITY_LAST
|
|
||||||
}
|
|
||||||
lockPriority_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
LOCKTYPE_NONE = 0, /* 0 - No lock present */
|
|
||||||
LOCKTYPE_PWM, /* 1 - PWM motor */
|
|
||||||
LOCKTYPE_ELECTRIC_STRIKE, /* 2 - Electric strike (normally de-energized, uses Motor A side of H-bridge) */
|
|
||||||
LOCKTYPE_MAGNETIC_LOCK, /* 3 - Magnetic lock (normally energized, uses Motor A side of H-bridge) */
|
|
||||||
LOCKTYPE_RELAY, /* 4 - Relay (normally de-energized, uses Motor B side of H-bridge) */
|
|
||||||
LOCKTYPE_LAST
|
|
||||||
}
|
|
||||||
lockType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
MFGFIELD_IOPINS = 0, /* 0 - Contains data about the state of the IO pins */
|
|
||||||
MFGFIELD_ADCS, /* 1 - Contains raw ADC data */
|
|
||||||
MFGFIELD_HARDWAREID, /* 2 - Contains hardware ID & revision of PIC */
|
|
||||||
MFGFIELD_CHECKPOINTLOG, /* 3 - Contains the checkpoint log data */
|
|
||||||
MFGFIELD_CPUREGISTERS, /* 4 - Contains the contents of selected PIC registers */
|
|
||||||
MFGFIELD_TASKFLAGS, /* 5 - Contains a list of all task flag values */
|
|
||||||
MFGFIELD_TIMERCHAIN, /* 6 - Contains a complete list of all active timers (timerData_t) */
|
|
||||||
MFGFIELD_PEEKPOKE, /* 7 - Contains results of peeking memory (U8, U16, U32, or string) */
|
|
||||||
MFGFIELD_LOCKSTATE, /* 8 - Contains the current passage mode flags (lockState_t) */
|
|
||||||
MFGFIELD_CAPABILITIES, /* 9 - Contains lock capability info (# users, event log entries, etc) */
|
|
||||||
MFGFIELD_DUMPM41T81, /* 10 - Contains a complete dump of the M41T81 RTC registers */
|
|
||||||
MFGFIELD_NVRAMCHECKSUMVALUE, /* 11 - Contains the 32-bit NVRAM checksum value */
|
|
||||||
MFGFIELD_CHECKSUMRESULTS, /* 12 - Contains results from checksumming exceptions, exceptiong roups, time zone calendars and time zones */
|
|
||||||
MFGFIELD_MORTISESTATELOG, /* 13 - Contains the last 32 mortise state changes */
|
|
||||||
MFGFIELD_MORTISEPINS, /* 14 - Contains the mortise pin status (S1,S2,S3,S4) */
|
|
||||||
MFGFIELD_KEYPADCHAR, /* 15 - Contains a character from the keypad */
|
|
||||||
MFGFIELD_MAGCARD, /* 16 - Contains mag card data */
|
|
||||||
MFGFIELD_PROXCARD, /* 17 - Contains prox card data */
|
|
||||||
MFGFIELD_LAST
|
|
||||||
}
|
|
||||||
mfgField_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
MORTISETYPE_NONE = 0, /* 0 - No mortise installed */
|
|
||||||
MORTISETYPE_S82276, /* 1 - Sargent 82276 mortise (A) */
|
|
||||||
MORTISETYPE_S82277, /* 2 - Sargent 82277 mortise, no cylinder (B) */
|
|
||||||
MORTISETYPE_S82278, /* 3 - Sargent 82278 mortise, no deadbolt (C) */
|
|
||||||
MORTISETYPE_S82279, /* 4 - Sargent 82279 mortise, no cylinder or deadbolt (D) */
|
|
||||||
MORTISETYPE_S10G77, /* 5 - Sargent 10G77 bored lock body (E) */
|
|
||||||
MORTISETYPE_S8877, /* 6 - Sargent 8877 mortise exit device (F) */
|
|
||||||
MORTISETYPE_S8878, /* 7 - Sargent 8878 mortise exit device, no cylinder (G) */
|
|
||||||
MORTISETYPE_S8977, /* 8 - Sargent 8977 mortise exit device (H) */
|
|
||||||
MORTISETYPE_S8978, /* 9 - Sargent 8978 mortise exit device, no cylinder (I) */
|
|
||||||
MORTISETYPE_CRML20x36, /* 10 - Corbin-Russwin ML20736/ML20836 mortise (J) */
|
|
||||||
MORTISETYPE_CRML20x35, /* 11 - Corbin-Russwin ML20735/ML20835 mortise, no cylinder (K) */
|
|
||||||
MORTISETYPE_CRML20x34, /* 12 - Corbin-Russwin ML20734/ML20834 mortise, no deadbolt (L) */
|
|
||||||
MORTISETYPE_CRML20x33, /* 13 - Corbin-Russwin ML20733/ML20833 mortise, no cylinder or deadbolt (M) */
|
|
||||||
MORTISETYPE_CRCL33x34, /* 14 - Corbin-Russwin CL33734/CL33834 bored lock body (N) */
|
|
||||||
MORTISETYPE_CR9X34, /* 15 - Corbin-Russwin 9734/9834 bored lock body (O) */
|
|
||||||
MORTISETYPE_CR9X33, /* 16 - Corbin-Russwin 9833/9833 bored lock body, no cylinder (P) */
|
|
||||||
MORTISETYPE_CR9MX34, /* 17 - Corbin-Russwin 9M734/9M834 bored lock body (Q) */
|
|
||||||
MORTISETYPE_CR9MX33, /* 18 - Corbin-Russwin 9M733/9M833 bored lock body, no cylinder (R) */
|
|
||||||
MORTISETYPE_LAST
|
|
||||||
}
|
|
||||||
mortiseType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
NVRAMCLEAROPTIONS_NONE = 0x0000, /* Place holder */
|
|
||||||
NVRAMCLEAROPTIONS_CFGINSTALLER = 0x0001, /* Options settable by the installer (lock type, etc) */
|
|
||||||
NVRAMCLEAROPTIONS_CFGADMIN = 0x0002, /* Options settable by the lock administrator (time, date, etc) */
|
|
||||||
NVRAMCLEAROPTIONS_EXCEPTIONS = 0x0004, /* The exceptions definitions */
|
|
||||||
NVRAMCLEAROPTIONS_EXCEPTIONGROUPS = 0x0008, /* The exception group definitions */
|
|
||||||
NVRAMCLEAROPTIONS_CALENDARS = 0x0010, /* The timezones calendar definitions */
|
|
||||||
NVRAMCLEAROPTIONS_TIMEZONES = 0x0020, /* The timezones definitions */
|
|
||||||
NVRAMCLEAROPTIONS_FILTERS = 0x0040, /* Recording filters */
|
|
||||||
NVRAMCLEAROPTIONS_EVENTLOG = 0x0080, /* The event log */
|
|
||||||
NVRAMCLEAROPTIONS_USERDATA = 0x0100, /* The actual user database */
|
|
||||||
NVRAMCLEAROPTIONS_DECLINEDLOG = 0x0200, /* Declined credentials log */
|
|
||||||
NVRAMCLEAROPTIONS_ALARMLOG = 0x0400, /* Alarm log */
|
|
||||||
NVRAMCLEAROPTIONS_LRUCACHE = 0x0800, /* LRU cache for remote authorization (status, user doesn't clear explicitly) */
|
|
||||||
NVRAMCLEAROPTIONS_DBHASH = 0x1000, /* User database hash (status, user doesn't clear explicitly) */
|
|
||||||
NVRAMCLEAROPTIONS_CFGSYSTEM = 0x2000, /* Factory settable options, system variables (status, user doesn't clear explicitly) */
|
|
||||||
NVRAMCLEAROPTIONS_AVAIL4000 = 0x4000, /* Unused */
|
|
||||||
NVRAMCLEAROPTIONS_ALL = 0x7fff, /* All of the above */
|
|
||||||
NVRAMCLEAROPTIONS_USEBACKUP = 0x8000 /* If set, installer and admin options are set according from NVRAM backup (if valid) */
|
|
||||||
}
|
|
||||||
nvramClearOptions_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
NVRAMCOMMAND_BACKUP = 0, /* 0 - Backup NVRAM to backup region */
|
|
||||||
NVRAMCOMMAND_ERASE, /* 1 - Erase backup region */
|
|
||||||
NVRAMCOMMAND_RESTORE, /* 2 - Restore NVRAM from backup region */
|
|
||||||
NVRAMCOMMAND_LAST
|
|
||||||
}
|
|
||||||
nvramCommand_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
NVRAMDUMPSELECT_ALL = 0, /* 0 - Dump all */
|
|
||||||
NVRAMDUMPSELECT_PIC, /* 1 - Dump NVRAM on PIC */
|
|
||||||
NVRAMDUMPSELECT_USER, /* 2 - Dump I2C NVRAM containing user data, exceptions, exception groups, calendars, timezones */
|
|
||||||
NVRAMDUMPSELECT_EVENT, /* 3 - Dump I2C NVRAM containing event log, declined log, alarm log, LRU cache */
|
|
||||||
NVRAMDUMPSELECT_LAST
|
|
||||||
}
|
|
||||||
nvramDumpSelect_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
PEEKPOKE_READU8 = 0, /* 0 - Read 8 bit value */
|
|
||||||
PEEKPOKE_READU16, /* 1 - Read 16 bit value */
|
|
||||||
PEEKPOKE_READU24, /* 2 - Read 24 bit value */
|
|
||||||
PEEKPOKE_READU32, /* 3 - Read 32 bit value */
|
|
||||||
PEEKPOKE_READSTRING, /* 4 - Read 'n' 8 bit values */
|
|
||||||
PEEKPOKE_WRITEU8, /* 5 - Write 8 bit value */
|
|
||||||
PEEKPOKE_WRITEU16, /* 6 - Write 16 bit value */
|
|
||||||
PEEKPOKE_WRITEU24, /* 7 - Write 24 bit value */
|
|
||||||
PEEKPOKE_WRITEU32, /* 8 - Write 32 bit value */
|
|
||||||
PEEKPOKE_WRITESTRING, /* 9 - Write 'n' 8 bit values */
|
|
||||||
PEEKPOKE_LAST
|
|
||||||
}
|
|
||||||
peekPoke_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
PPMISOURCE_NONE = 0, /* 0 - PPMI came from nowhere (not set) */
|
|
||||||
PPMISOURCE_PIN, /* 1 - PPMI came from PIN */
|
|
||||||
PPMISOURCE_PROX, /* 2 - PPMI came from Prox */
|
|
||||||
PPMISOURCE_MAGCARD, /* 3 - PPMI came from mag card */
|
|
||||||
PPMISOURCE_LAST
|
|
||||||
}
|
|
||||||
ppmiSource_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
RADIOMODE_HOSTINITIATED = 0, /* 0 - DPAC in listen mode (default) */
|
|
||||||
RADIOMODE_LOCKINITIATED, /* 1 - DPAC in pass-through mode */
|
|
||||||
RADIOMODE_LAST
|
|
||||||
}
|
|
||||||
radioMode_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
RADIOTYPE_NONE = 0, /* 0 - No radio present */
|
|
||||||
RADIOTYPE_WIPORTNR, /* 1 - WiPortNR */
|
|
||||||
RADIOTYPE_DPAC80211B, /* 2 - DPAC 802.11b */
|
|
||||||
RADIOTYPE_DPAC80211BG, /* 3 - DPAC 802.11bg */
|
|
||||||
RADIOTYPE_LAST
|
|
||||||
}
|
|
||||||
radioType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
RESPONSETYPE_OK = 0, /* 0 - All is well */
|
|
||||||
RESPONSETYPE_ERROR, /* 1 - Generic error */
|
|
||||||
RESPONSETYPE_HASDATA, /* 2 - Response has data */
|
|
||||||
RESPONSETYPE_NOHANDLER, /* 3 - Command requested with no handler (internal error) */
|
|
||||||
RESPONSETYPE_NOSESSION, /* 4 - No session established */
|
|
||||||
RESPONSETYPE_BADCOMMAND, /* 5 - Bad command value */
|
|
||||||
RESPONSETYPE_BADPARAMETER, /* 6 - Bad parameter (can mean a lot of things) */
|
|
||||||
RESPONSETYPE_BADPARAMETERLEN, /* 7 - Bad parameter length (too short, too long) */
|
|
||||||
RESPONSETYPE_MISSINGPARAMETER, /* 8 - Missing parameter (something was required, what'd you forget?) */
|
|
||||||
RESPONSETYPE_DUPLICATEPARAMETER, /* 9 - Parameter supplied more than once (D'oh!) */
|
|
||||||
RESPONSETYPE_PARAMETERCONFLICT, /* 10 - Parameters conflict (usually mutually exclusive items) */
|
|
||||||
RESPONSETYPE_BADDEVICE, /* 11 - Bad device (command came from a device that's not allowed) */
|
|
||||||
RESPONSETYPE_NVRAMERROR, /* 12 - Hardware problem... */
|
|
||||||
RESPONSETYPE_NVRAMERRORNOACK, /* 13 - Hardware problem... */
|
|
||||||
RESPONSETYPE_NVRAMERRORNOACK32, /* 14 - Hardware problem... */
|
|
||||||
RESPONSETYPE_NOTI2CADDRESS, /* 15 - Illegal I2C address in i2cStart */
|
|
||||||
RESPONSETYPE_FIRMWAREERROR, /* 16 - Generic firmware upload error (can mean lots of things) */
|
|
||||||
RESPONSETYPE_DUMPINPROGRESS, /* 17 - Can't do something, a dump is in progress */
|
|
||||||
RESPONSETYPE_INTERNALERROR, /* 18 - Something Bad Happened(tm) */
|
|
||||||
RESPONSETYPE_NOTIMPLEMENTED, /* 19 - Command or function not implemented */
|
|
||||||
RESPONSETYPE_PINFORMATERROR, /* 20 - Error in formatting of PIN (non hex character) */
|
|
||||||
RESPONSETYPE_PINEXISTS, /* 21 - PIN already exists in database */
|
|
||||||
RESPONSETYPE_PINNOTFOUND, /* 22 - PIN wasn't found (actionManageUsers) */
|
|
||||||
RESPONSETYPE_USERACTIVE, /* 23 - The record for this user is active (not deleted or free) */
|
|
||||||
RESPONSETYPE_USERINACTIVE, /* 24 - The record for this user is inactive (not in use) */
|
|
||||||
RESPONSETYPE_PARENTNOTFOUND, /* 25 - Users parent couldn't be found (used internally by dbmgr.c) */
|
|
||||||
RESPONSETYPE_NOCHAIN, /* 26 - No users in chain (used internally by dbmgr.c) */
|
|
||||||
RESPONSETYPE_CAUGHTINLOOP, /* 27 - Caught in a loop somewhere */
|
|
||||||
RESPONSETYPE_EVENTFILTERED, /* 28 - Event record was filtered (eventlog.c) */
|
|
||||||
RESPONSETYPE_PAYLOADTOOLARGE, /* 29 - Message payload too large (protocol.c) */
|
|
||||||
RESPONSETYPE_ENDOFDATA, /* 30 - No more data (used internally by eventlog.c) */
|
|
||||||
RESPONSETYPE_RMTAUTHREJECTED, /* 31 - Remote authorization rejected (lockmgr.c) */
|
|
||||||
RESPONSETYPE_NVRAMVERSIONERROR, /* 32 - NVRAM version doesn't match expected value */
|
|
||||||
RESPONSETYPE_NOHARDWARE, /* 33 - Operation requested for unsupported hardware */
|
|
||||||
RESPONSETYPE_SCHEDULERCONFLICT, /* 34 - Scheduler not in correct mode for this operation */
|
|
||||||
RESPONSETYPE_NVRAMWRITEERROR, /* 35 - NVRAM write compare error */
|
|
||||||
RESPONSETYPE_DECLINEDFILTERED, /* 36 - Declined record was filtered (declinedlog.c) */
|
|
||||||
RESPONSETYPE_NECONFIGPARM, /* 37 - Non-existent configuration parameter */
|
|
||||||
RESPONSETYPE_FLASHERASEERROR, /* 38 - Error erasing FLASH */
|
|
||||||
RESPONSETYPE_FLASHWRITEERROR, /* 39 - Error writing FLASH */
|
|
||||||
RESPONSETYPE_BADNVBACKUP, /* 40 - NVBackup length doesn't match sizeof (configParametersNV_t) */
|
|
||||||
RESPONSETYPE_EARLYACK, /* 41 - Sent prior to long commands if CONFIGITEM_EARLYACK set */
|
|
||||||
RESPONSETYPE_ALARMFILTERED, /* 42 - Alarm record was filtered (alarm.c) */
|
|
||||||
RESPONSETYPE_ACVFAILURE, /* 43 - Auxiliary controller version request failure */
|
|
||||||
RESPONSETYPE_USERCHECKSUMERROR, /* 44 - User checksum value error */
|
|
||||||
RESPONSETYPE_CHECKSUMERROR, /* 45 - Generic checksum error */
|
|
||||||
RESPONSETYPE_RTCSQWFAILURE, /* 46 - RTC isn't generating square wave */
|
|
||||||
RESPONSETYPE_PRIORITYSHUTDOWN, /* 47 - Session terminated early because lock has priority over communications */
|
|
||||||
RESPONSETYPE_NOTMODIFIABLE, /* 48 - Configuration parameter is not user modifiable */
|
|
||||||
RESPONSETYPE_CANTPRESERVE, /* 49 - Can't preserve configuration (config.c, not enough space) */
|
|
||||||
RESPONSETYPE_INPASSAGEMODE, /* 50 - Lock is in passage mode, can't do remote unlock */
|
|
||||||
RESPONSETYPE_LAST,
|
|
||||||
/*
|
|
||||||
* These should not be exposed to the user
|
|
||||||
*/
|
|
||||||
RESPONSETYPE_NOREPLY, /* 51 - Do not send a reply, subroutine is posting it's own */
|
|
||||||
RESPONSETYPE_TAKEABREAK, /* 52 - Intermediate return result, when log searches taking too long */
|
|
||||||
RESPONSETYPE_DPACBLOCKS, /* 53 - PWM lock, battery powered, DPAC takes priority */
|
|
||||||
RESPONSETYPE_ACKNAKTIMEOUT, /* 54 - Added for console.c, not used in lock firmware */
|
|
||||||
RESPONSETYPE_UNKNOWNCPUSPEED /* 55 - Unknown CPU speed (utils.c, utilCalculateClockRate()) */
|
|
||||||
}
|
|
||||||
responseType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
SCHEDULERTYPE_HARDON = 0, /* 0 - Radio is always on */
|
|
||||||
SCHEDULERTYPE_SIMPLE, /* 1 - Simple 'x' minutes off, 'y' seconds on scheduler */
|
|
||||||
SCHEDULERTYPE_DOM, /* 2 - Day of month scheduling */
|
|
||||||
SCHEDULERTYPE_DOW, /* 3 - Day of week scheduling */
|
|
||||||
SCHEDULERTYPE_COMMUSER, /* 4 - Only a comm user triggers power on */
|
|
||||||
SCHEDULERTYPE_HOD, /* 5 - Hour of day scheduling */
|
|
||||||
SCHEDULERTYPE_OFF, /* 6 - Nothing wakes up radio */
|
|
||||||
SCHEDULERTYPE_LAST
|
|
||||||
}
|
|
||||||
schedulerType_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
TIMEZONEMODE_NORMAL = 0, /* 0 - Timezone is applied to user, no auto unlocking */
|
|
||||||
TIMEZONEMODE_EXCLUSION, /* 1 - User NOT permitted access if in this zone at this time */
|
|
||||||
TIMEZONEMODE_AUTOTIME, /* 2 - Auto unlock at the start of the TZ, lock at end */
|
|
||||||
TIMEZONEMODE_AUTOFPT, /* 3 - Unlock on first person through, lock at end */
|
|
||||||
TIMEZONEMODE_UAPM, /* 4 - Permits user activated passage mode when active */
|
|
||||||
TIMEZONEMODE_LAST
|
|
||||||
}
|
|
||||||
timeZoneMode_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
UNLOCKMODE_NORMAL = 0, /* 0 - Normal unlock (CONFIGITEM_UNLOCK_TIME duration) */
|
|
||||||
UNLOCKMODE_UNLOCK, /* 1 - Unlock, switching to passage mode */
|
|
||||||
UNLOCKMODE_LOCK, /* 2 - Lock, regardless of mode */
|
|
||||||
UNLOCKMODE_LAST
|
|
||||||
}
|
|
||||||
unlockMode_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
UPSTREAMCOMMAND_RESERVED = 0, /* 0 - Not used */
|
|
||||||
UPSTREAMCOMMAND_DEBUGMSG, /* 1 - Debug message (zero terminated) */
|
|
||||||
UPSTREAMCOMMAND_QUERYVERSION, /* 2 - Version string (zero terminated) */
|
|
||||||
UPSTREAMCOMMAND_QUERYDATETIME, /* 3 - Current date/time */
|
|
||||||
UPSTREAMCOMMAND_QUERYSERIALNUMBER, /* 5 - Serial number (MAX_SERIALNUM_LENGTH bytes) */
|
|
||||||
UPSTREAMCOMMAND_DUMPEVENTLOG, /* 6 - Event log record */
|
|
||||||
UPSTREAMCOMMAND_DUMPNVRAM, /* 7 - NVRAM dump record */
|
|
||||||
UPSTREAMCOMMAND_RMTAUTHREQUEST, /* 8 - Remote authorization request */
|
|
||||||
UPSTREAMCOMMAND_RETRIEVEUSER, /* 9 - Retrieve user record */
|
|
||||||
UPSTREAMCOMMAND_QUERYCONFIG, /* 10 - Query configuration */
|
|
||||||
UPSTREAMCOMMAND_RMTEVENTLOGRECORD, /* 11 - Remote event log record */
|
|
||||||
UPSTREAMCOMMAND_DPAC, /* 12 - DPAC related message */
|
|
||||||
UPSTREAMCOMMAND_NOTIFY, /* 14 - Notify user message */
|
|
||||||
UPSTREAMCOMMAND_MFG, /* 15 - Manufacturing data */
|
|
||||||
UPSTREAMCOMMAND_EVENTLOGWARNING, /* 16 - Event log warning level message */
|
|
||||||
UPSTREAMCOMMAND_DUMPNVRAMRLE, /* 17 - Run Length Encoded (RLE) NVRAM dump record */
|
|
||||||
UPSTREAMCOMMAND_RMTDECLINEDRECORD, /* 18 - Remote declined log record */
|
|
||||||
UPSTREAMCOMMAND_DECLINEDWARNING, /* 19 - Declined log warning level message */
|
|
||||||
UPSTREAMCOMMAND_DUMPDECLINEDLOG, /* 20 - Declined log record dump */
|
|
||||||
UPSTREAMCOMMAND_RMTALARMRECORD, /* 21 - Remote alarm log record */
|
|
||||||
UPSTREAMCOMMAND_ALARMWARNING, /* 22 - Alarm log warning level message */
|
|
||||||
UPSTREAMCOMMAND_DUMPALARMLOG, /* 23 - Alarm log record dump */
|
|
||||||
UPSTREAMCOMMAND_CONNECTSCHEDULER, /* 24 - Connection because of scheduler, contains serial number */
|
|
||||||
UPSTREAMCOMMAND_CONNECTCOMMUSER, /* 25 - Connection because of comm user, contains serial number */
|
|
||||||
UPSTREAMCOMMAND_CONNECTALARM, /* 26 - Connection because of alarm event, contains serial number */
|
|
||||||
UPSTREAMCOMMAND_DUMPDEBUGLOG, /* 27 - Debug log dump record */
|
|
||||||
UPSTREAMCOMMAND_LAST
|
|
||||||
}
|
|
||||||
upstreamCommand_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
UPSTREAMFIELD_NOTUSED = 0, /* 0 - Not used */
|
|
||||||
UPSTREAMFIELD_SERIALNUMBER, /* 1 - Contains unit serial number */
|
|
||||||
UPSTREAMFIELD_NAR, /* 2 - Contains 16 bit Next Available Record */
|
|
||||||
UPSTREAMFIELD_ENTRYDEVICE, /* 3 - Contains a ppmSource_e */
|
|
||||||
UPSTREAMFIELD_PPMIFIELDTYPE, /* 4 - Contains a type of _PIN (auxFieldType_e) */
|
|
||||||
UPSTREAMFIELD_PIN, /* 5 - Contains a PIN, Prox, mag key */
|
|
||||||
UPSTREAMFIELD_SEQUENCENUMBER, /* 6 - Contains 16 bit sequence number */
|
|
||||||
UPSTREAMFIELD_RESPONSEWINDOW, /* 7 - Contains 8 bit response window (number of seconds) */
|
|
||||||
UPSTREAMFIELD_USERNUMBER, /* 8 - Contains 16 bit user number */
|
|
||||||
UPSTREAMFIELD_VERSION, /* 9 - Contains version string */
|
|
||||||
UPSTREAMFIELD_EVENTLOGRECORD, /* 10 - Contains eventLog_e event log record */
|
|
||||||
UPSTREAMFIELD_DATETIME, /* 11 - Contains 8 byte date/time data */
|
|
||||||
UPSTREAMFIELD_EVENTLOGRECORDCOUNT, /* 17 - Contains number of event log records */
|
|
||||||
UPSTREAMFIELD_DECLINEDRECORDCOUNT, /* 20 - Contains number of declined log records */
|
|
||||||
UPSTREAMFIELD_DECLINEDRECORD, /* 21 - Contains declinedLog_t declined log record */
|
|
||||||
UPSTREAMFIELD_USERTYPE, /* 23 - Contains the user type (master, emergency, normal, etc) */
|
|
||||||
UPSTREAMFIELD_ACCESSALWAYS, /* 24 - Contains the access always mode (true, false) */
|
|
||||||
UPSTREAMFIELD_CACHED, /* 25 - Contains the cached flag (true, false) */
|
|
||||||
UPSTREAMFIELD_PRIMARYFIELDTYPE, /* 26 - Contains the primary field type (pin, prox, mag) */
|
|
||||||
UPSTREAMFIELD_AUXFIELDTYPE, /* 27 - Contains the aux field type (pin, prox, mag) */
|
|
||||||
UPSTREAMFIELD_ACCESSMODE, /* 28 - Contains the access mode (aux only, aux + pin, aux or pin, etc) */
|
|
||||||
UPSTREAMFIELD_EXPIREON, /* 29 - Contains the date the user expires on (00/00/00 if not set) */
|
|
||||||
UPSTREAMFIELD_USECOUNT, /* 30 - Contains the use count (if user type is ONE_TIME) */
|
|
||||||
UPSTREAMFIELD_TIMEZONE, /* 31 - Contains the timezone bit map */
|
|
||||||
UPSTREAMFIELD_EXCEPTIONGROUP, /* 32 - Contains the exception group */
|
|
||||||
UPSTREAMFIELD_PRIMARYPIN, /* 33 - Contains the primary PPMI (ASCII, 0 terminated) */
|
|
||||||
UPSTREAMFIELD_AUXPIN, /* 34 - Contains the aux PPMI (ASCII, 0 terminated) */
|
|
||||||
UPSTREAMFIELD_ALARMRECORDCOUNT, /* 35 - Contains number of alarm log records */
|
|
||||||
UPSTREAMFIELD_ALARMRECORD, /* 36 - Contains alarmLog_t alarm log record */
|
|
||||||
UPSTREAMFIELD_AUXCTLRVERSION, /* 37 - Contains the version number of the auxiliary controller */
|
|
||||||
UPSTREAMFIELD_LAST
|
|
||||||
}
|
|
||||||
upstreamField_e;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
USERTYPE_NONE = 0, /* 0 - No user */
|
|
||||||
USERTYPE_MASTER, /* 1 - Master user (clears panic, relock, lockout and auto open) */
|
|
||||||
USERTYPE_EMERGENCY, /* 2 - Opens door regardless of state */
|
|
||||||
USERTYPE_SUPERVISOR, /* 3 - Like emergency user, except won't unlock when in panic mode */
|
|
||||||
USERTYPE_USER, /* 4 - Generic user */
|
|
||||||
USERTYPE_EXTENDED, /* 5 - Same as _USER, but strike can be kept open longer */
|
|
||||||
USERTYPE_PASSAGE, /* 6 - Toggles strike between passage and non-passage modes */
|
|
||||||
USERTYPE_ONETIME, /* 7 - User may be used one time */
|
|
||||||
USERTYPE_PANIC, /* 8 - Locks down locks, no user except master valid */
|
|
||||||
USERTYPE_LOCKOUT, /* 9 - Locks out regular, extended, passage, one time, and notify users */
|
|
||||||
USERTYPE_RELOCK, /* 10 - Relock cancels passage mode, but can't unlock */
|
|
||||||
USERTYPE_NOTIFY, /* 11 - Same as _USER, only sends unsolicited message to server */
|
|
||||||
USERTYPE_COMM, /* 12 - Kicks a communications sessions off if not running _HARDON scheduler */
|
|
||||||
USERTYPE_SUSPENDED, /* 13 - User is suspended */
|
|
||||||
USERTYPE_LAST
|
|
||||||
}
|
|
||||||
userType_e;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Editor modelines
|
|
||||||
*
|
|
||||||
* Local variables:
|
|
||||||
* c-basic-offset: 2
|
|
||||||
* tab-width: 8
|
|
||||||
* indent-tabs-mode: nil
|
|
||||||
* End:
|
|
||||||
*
|
|
||||||
* vim: set tabstop=2 softtabstop=2 shiftwidth=2 expandtab:
|
|
||||||
*/
|
|
|
@ -54,11 +54,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <epan/packet.h>
|
#include <epan/packet.h>
|
||||||
#include <epan/addr_and_mask.h>
|
#include <epan/addr_and_mask.h>
|
||||||
#include "packet-bgp.h"
|
|
||||||
#include "packet-frame.h"
|
#include "packet-frame.h"
|
||||||
#include <epan/afn.h>
|
#include <epan/afn.h>
|
||||||
#include <epan/prefs.h>
|
#include <epan/prefs.h>
|
||||||
|
@ -68,33 +68,249 @@
|
||||||
|
|
||||||
/* #define MAX_STR_LEN 256 */
|
/* #define MAX_STR_LEN 256 */
|
||||||
|
|
||||||
|
/* some handy things to know */
|
||||||
|
#define BGP_MAX_PACKET_SIZE 4096
|
||||||
|
#define BGP_MARKER_SIZE 16 /* size of BGP marker */
|
||||||
|
#define BGP_HEADER_SIZE 19 /* size of BGP header, including marker */
|
||||||
|
#define BGP_MIN_OPEN_MSG_SIZE 29
|
||||||
|
#define BGP_MIN_UPDATE_MSG_SIZE 23
|
||||||
|
#define BGP_MIN_NOTIFICATION_MSG_SIZE 21
|
||||||
|
#define BGP_MIN_KEEPALVE_MSG_SIZE BGP_HEADER_SIZE
|
||||||
|
#define BGP_TCP_PORT 179
|
||||||
|
#define BGP_ROUTE_DISTINGUISHER_SIZE 8
|
||||||
|
|
||||||
|
/* BGP message types */
|
||||||
|
#define BGP_OPEN 1
|
||||||
|
#define BGP_UPDATE 2
|
||||||
|
#define BGP_NOTIFICATION 3
|
||||||
|
#define BGP_KEEPALIVE 4
|
||||||
|
#define BGP_ROUTE_REFRESH 5
|
||||||
|
#define BGP_CAPABILITY 6
|
||||||
|
#define BGP_ROUTE_REFRESH_CISCO 0x80
|
||||||
|
|
||||||
|
|
||||||
|
/* BGP ROUTE-REFRESH message */
|
||||||
|
struct bgp_route_refresh {
|
||||||
|
guint8 bgpr_marker[BGP_MARKER_SIZE];
|
||||||
|
guint16 bgpr_len;
|
||||||
|
guint8 bgpr_type;
|
||||||
|
guint16 bgpr_afi;
|
||||||
|
guint8 bgpr_reserved;
|
||||||
|
guint8 bgpr_safi;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* path attribute */
|
||||||
|
struct bgp_attr {
|
||||||
|
guint8 bgpa_flags;
|
||||||
|
guint8 bgpa_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* attribute flags, from RFC1771 */
|
||||||
|
#define BGP_ATTR_FLAG_OPTIONAL 0x80
|
||||||
|
#define BGP_ATTR_FLAG_TRANSITIVE 0x40
|
||||||
|
#define BGP_ATTR_FLAG_PARTIAL 0x20
|
||||||
|
#define BGP_ATTR_FLAG_EXTENDED_LENGTH 0x10
|
||||||
|
|
||||||
|
/* SSA flags */
|
||||||
|
#define BGP_SSA_TRANSITIVE 0x8000
|
||||||
|
#define BGP_SSA_TYPE 0x7FFF
|
||||||
|
|
||||||
|
/* SSA Types */
|
||||||
|
#define BGP_SSA_L2TPv3 1
|
||||||
|
#define BGP_SSA_mGRE 2
|
||||||
|
#define BGP_SSA_IPSec 3
|
||||||
|
#define BGP_SSA_MPLS 4
|
||||||
|
#define BGP_SSA_L2TPv3_IN_IPSec 5
|
||||||
|
#define BGP_SSA_mGRE_IN_IPSec 6
|
||||||
|
|
||||||
|
/* AS_PATH segment types */
|
||||||
|
#define AS_SET 1 /* RFC1771 */
|
||||||
|
#define AS_SEQUENCE 2 /* RFC1771 */
|
||||||
|
#define AS_CONFED_SET 4 /* RFC1965 has the wrong values, corrected in */
|
||||||
|
#define AS_CONFED_SEQUENCE 3 /* draft-ietf-idr-bgp-confed-rfc1965bis-01.txt */
|
||||||
|
|
||||||
|
/* OPEN message Optional Parameter types */
|
||||||
|
#define BGP_OPTION_AUTHENTICATION 1 /* RFC1771 */
|
||||||
|
#define BGP_OPTION_CAPABILITY 2 /* RFC2842 */
|
||||||
|
|
||||||
|
/* BGP capability code */
|
||||||
|
#define BGP_CAPABILITY_RESERVED 0 /* RFC2434 */
|
||||||
|
#define BGP_CAPABILITY_MULTIPROTOCOL 1 /* RFC2858 */
|
||||||
|
#define BGP_CAPABILITY_ROUTE_REFRESH 2 /* RFC2918 */
|
||||||
|
#define BGP_CAPABILITY_COOPERATIVE_ROUTE_FILTERING 3 /* draft-ietf-idr-route-filter-04.txt */
|
||||||
|
#define BGP_CAPABILITY_GRACEFUL_RESTART 0x40 /* draft-ietf-idr-restart-05 */
|
||||||
|
#define BGP_CAPABILITY_4_OCTET_AS_NUMBER 0x41 /* draft-ietf-idr-as4bytes-06 */
|
||||||
|
#define BGP_CAPABILITY_DYNAMIC_CAPABILITY 0x42 /* draft-ietf-idr-dynamic-cap-03 */
|
||||||
|
#define BGP_CAPABILITY_ADDITIONAL_PATHS 0x45 /* draft-ietf-idr-add-paths */
|
||||||
|
#define BGP_CAPABILITY_ORF_CISCO 0x82 /* Cisco */
|
||||||
|
#define BGP_CAPABILITY_ROUTE_REFRESH_CISCO 0x80 /* Cisco */
|
||||||
|
|
||||||
|
#define BGP_ORF_PREFIX_CISCO 0x80 /* Cisco */
|
||||||
|
#define BGP_ORF_COMM_CISCO 0x81 /* Cisco */
|
||||||
|
#define BGP_ORF_EXTCOMM_CISCO 0x82 /* Cisco */
|
||||||
|
#define BGP_ORF_ASPATH_CISCO 0x83 /* Cisco */
|
||||||
|
|
||||||
|
#define BGP_ORF_COMM 0x02 /* draft-ietf-idr-route-filter-06.txt */
|
||||||
|
#define BGP_ORF_EXTCOMM 0x03 /* draft-ietf-idr-route-filter-06.txt */
|
||||||
|
#define BGP_ORF_ASPATH 0x04 /* draft-ietf-idr-aspath-orf-02.txt */
|
||||||
|
/* draft-ietf-idr-route-filter-06.txt */
|
||||||
|
#define BGP_ORF_ACTION 0xc0
|
||||||
|
#define BGP_ORF_ADD 0x00
|
||||||
|
#define BGP_ORF_REMOVE 0x40
|
||||||
|
#define BGP_ORF_REMOVEALL 0x80
|
||||||
|
#define BGP_ORF_MATCH 0x20
|
||||||
|
#define BGP_ORF_PERMIT 0x00
|
||||||
|
#define BGP_ORF_DENY 0x20
|
||||||
|
|
||||||
|
/* well-known communities, from RFC1997 */
|
||||||
|
#define BGP_COMM_NO_EXPORT 0xFFFFFF01
|
||||||
|
#define BGP_COMM_NO_ADVERTISE 0xFFFFFF02
|
||||||
|
#define BGP_COMM_NO_EXPORT_SUBCONFED 0xFFFFFF03
|
||||||
|
#define FOURHEX0 0x00000000
|
||||||
|
#define FOURHEXF 0xFFFF0000
|
||||||
|
|
||||||
|
/* attribute types */
|
||||||
|
#define BGPTYPE_ORIGIN 1 /* RFC1771 */
|
||||||
|
#define BGPTYPE_AS_PATH 2 /* RFC1771 */
|
||||||
|
#define BGPTYPE_NEXT_HOP 3 /* RFC1771 */
|
||||||
|
#define BGPTYPE_MULTI_EXIT_DISC 4 /* RFC1771 */
|
||||||
|
#define BGPTYPE_LOCAL_PREF 5 /* RFC1771 */
|
||||||
|
#define BGPTYPE_ATOMIC_AGGREGATE 6 /* RFC1771 */
|
||||||
|
#define BGPTYPE_AGGREGATOR 7 /* RFC1771 */
|
||||||
|
#define BGPTYPE_COMMUNITIES 8 /* RFC1997 */
|
||||||
|
#define BGPTYPE_ORIGINATOR_ID 9 /* RFC2796 */
|
||||||
|
#define BGPTYPE_CLUSTER_LIST 10 /* RFC2796 */
|
||||||
|
#define BGPTYPE_DPA 11 /* work in progress */
|
||||||
|
#define BGPTYPE_ADVERTISER 12 /* RFC1863 */
|
||||||
|
#define BGPTYPE_RCID_PATH 13 /* RFC1863 */
|
||||||
|
#define BGPTYPE_MP_REACH_NLRI 14 /* RFC2858 */
|
||||||
|
#define BGPTYPE_MP_UNREACH_NLRI 15 /* RFC2858 */
|
||||||
|
#define BGPTYPE_EXTENDED_COMMUNITY 16 /* Draft Ramachandra */
|
||||||
|
#define BGPTYPE_NEW_AS_PATH 17 /* draft-ietf-idr-as4bytes */
|
||||||
|
#define BGPTYPE_NEW_AGGREGATOR 18 /* draft-ietf-idr-as4bytes */
|
||||||
|
#define BGPTYPE_SAFI_SPECIFIC_ATTR 19 /* draft-kapoor-nalawade-idr-bgp-ssa-00.txt */
|
||||||
|
#define BGPTYPE_TUNNEL_ENCAPS_ATTR 23 /* RFC5512 */
|
||||||
|
|
||||||
|
/* Extended community type */
|
||||||
|
/* according to IANA's number assignment at: http://www.iana.org/assignments/bgp-extended-communities */
|
||||||
|
#define BGP_EXT_COM_QOS_MARK_T 0x04 /* QoS Marking transitive attribute of regular type (8bit) */
|
||||||
|
#define BGP_EXT_COM_QOS_MARK_NT 0x44 /* QoS Marking non-transitive attribute of regular type (8bit) */
|
||||||
|
/* Format Type(1byte):Flags(1byte):QoS Set(1byte):Tec. Type(1byte): */
|
||||||
|
/* Marking O(2bytes):Marking A(1byte):Proc.Cnt(1byte) */
|
||||||
|
#define BGP_EXT_COM_COS_CAP_T 0x05 /* CoS Capability - Format Type(1byte):Flags(1byte):remaining '0..0' */
|
||||||
|
|
||||||
|
/* draft-ietf-idr-bgp-ext-communities */
|
||||||
|
#define BGP_EXT_COM_RT_0 0x0002 /* Route Target,Format AS(2bytes):AN(4bytes) */
|
||||||
|
#define BGP_EXT_COM_RT_1 0x0102 /* Route Target,Format IP address:AN(2bytes) */
|
||||||
|
#define BGP_EXT_COM_RT_2 0x0202 /* Route Target,Format AS(2bytes):AN(4bytes) */
|
||||||
|
#define BGP_EXT_COM_RO_0 0x0003 /* Route Origin,Format AS(2bytes):AN(4bytes) */
|
||||||
|
#define BGP_EXT_COM_RO_1 0x0103 /* Route Origin,Format IP address:AN(2bytes) */
|
||||||
|
#define BGP_EXT_COM_RO_2 0x0203 /* Route Origin,Format AS(2bytes):AN(4bytes) */
|
||||||
|
#define BGP_EXT_COM_LINKBAND ((BGP_ATTR_FLAG_TRANSITIVE << 8) | 0x0004)
|
||||||
|
/* Link Bandwidth,Format AS(2bytes):
|
||||||
|
* Bandwidth(4bytes) */
|
||||||
|
/* -2 version of the draft */
|
||||||
|
#define BGP_EXT_COM_VPN_ORIGIN 0x0005 /* OSPF Domin ID / VPN of Origin */
|
||||||
|
/* draft-rosen-vpns-ospf-bgp-mpls */
|
||||||
|
#define BGP_EXT_COM_OSPF_RTYPE 0x8000 /* OSPF Route Type,Format Area(4B):RouteType(1B):Options(1B) */
|
||||||
|
#define BGP_EXT_COM_OSPF_RID 0x8001 /* OSPF Router ID,Format RouterID(4B):Unused(2B) */
|
||||||
|
#define BGP_EXT_COM_L2INFO 0x800a /* draft-kompella-ppvpn-l2vpn */
|
||||||
|
|
||||||
|
/* Extended community QoS Marking technology type */
|
||||||
|
#define QOS_TECH_TYPE_DSCP 0x00 /* DiffServ enabled IP (DSCP encoding) */
|
||||||
|
#define QOS_TECH_TYPE_802_1q 0x01 /* Ethernet using 802.1q priority tag */
|
||||||
|
#define QOS_TECH_TYPE_E_LSP 0x02 /* MPLS using E-LSP */
|
||||||
|
#define QOS_TECH_TYPE_VC 0x03 /* Virtual Channel (VC) encoding using separate channels for */
|
||||||
|
/* QoS forwarding / one channel per class (e.g. ATM VCs, FR */
|
||||||
|
/* VCs, MPLS L-LSPs) */
|
||||||
|
#define QOS_TECH_TYPE_GMPLS_TIME 0x04 /* GMPLS - time slot encoding */
|
||||||
|
#define QOS_TECH_TYPE_GMPLS_LAMBDA 0x05 /* GMPLS - lambda encoding */
|
||||||
|
#define QOS_TECH_TYPE_GMPLS_FIBRE 0x06 /* GMPLS - fibre encoding */
|
||||||
|
|
||||||
|
/* OSPF codes for BGP_EXT_COM_OSPF_RTYPE draft-rosen-vpns-ospf-bgp-mpls */
|
||||||
|
#define BGP_OSPF_RTYPE_RTR 1 /* OSPF Router LSA */
|
||||||
|
#define BGP_OSPF_RTYPE_NET 2 /* OSPF Network LSA */
|
||||||
|
#define BGP_OSPF_RTYPE_SUM 3 /* OSPF Summary LSA */
|
||||||
|
#define BGP_OSPF_RTYPE_EXT 5 /* OSPF External LSA, note that ASBR doesn't apply to MPLS-VPN */
|
||||||
|
#define BGP_OSPF_RTYPE_NSSA 7 /* OSPF NSSA External*/
|
||||||
|
#define BGP_OSPF_RTYPE_SHAM 129 /* OSPF-MPLS-VPN Sham link */
|
||||||
|
#define BGP_OSPF_RTYPE_METRIC_TYPE 0x1 /* LSB of RTYPE Options Field */
|
||||||
|
|
||||||
|
/* Extended community & Route dinstinguisher formats */
|
||||||
|
#define FORMAT_AS2_LOC 0x00 /* Format AS(2bytes):AN(4bytes) */
|
||||||
|
#define FORMAT_IP_LOC 0x01 /* Format IP address:AN(2bytes) */
|
||||||
|
#define FORMAT_AS4_LOC 0x02 /* Format AS(4bytes):AN(2bytes) */
|
||||||
|
|
||||||
|
/* RFC 2858 subsequent address family numbers */
|
||||||
|
#define SAFNUM_UNICAST 1
|
||||||
|
#define SAFNUM_MULCAST 2
|
||||||
|
#define SAFNUM_UNIMULC 3
|
||||||
|
#define SAFNUM_MPLS_LABEL 4 /* rfc3107 */
|
||||||
|
#define SAFNUM_MCAST_VPN 5 /* draft-ietf-l3vpn-2547bis-mcast-bgp-08.txt */
|
||||||
|
#define SAFNUM_ENCAPSULATION 7 /* rfc5512 */
|
||||||
|
#define SAFNUM_TUNNEL 64 /* draft-nalawade-kapoor-tunnel-safi-02.txt */
|
||||||
|
#define SAFNUM_VPLS 65
|
||||||
|
#define SAFNUM_LAB_VPNUNICAST 128 /* Draft-rosen-rfc2547bis-03 */
|
||||||
|
#define SAFNUM_LAB_VPNMULCAST 129
|
||||||
|
#define SAFNUM_LAB_VPNUNIMULC 130
|
||||||
|
#define SAFNUM_ROUTE_TARGET 132 /* RFC 4684 Constrained Route Distribution for BGP/MPLS IP VPN */
|
||||||
|
|
||||||
|
/* BGP Additional Paths Capability */
|
||||||
|
#define BGP_ADDPATH_RECEIVE 0x01
|
||||||
|
#define BGP_ADDPATH_SEND 0x02
|
||||||
|
|
||||||
|
/* mcast-vpn route types draft-ietf-l3vpn-2547bis-mcast-bgp-08.txt */
|
||||||
|
#define MCAST_VPN_RTYPE_INTRA_AS_IPMSI_AD 1
|
||||||
|
#define MCAST_VPN_RTYPE_INTER_AS_IPMSI_AD 2
|
||||||
|
#define MCAST_VPN_RTYPE_SPMSI_AD 3
|
||||||
|
#define MCAST_VPN_RTYPE_LEAF_AD 4
|
||||||
|
#define MCAST_VPN_RTYPE_SOURCE_ACTIVE_AD 5
|
||||||
|
#define MCAST_VPN_RTYPE_SHARED_TREE_JOIN 6
|
||||||
|
#define MCAST_VPN_RTYPE_SOURCE_TREE_JOIN 7
|
||||||
|
|
||||||
|
/* RFC 5512 Tunnel Types */
|
||||||
|
#define TUNNEL_TYPE_L2TP_OVER_IP 1
|
||||||
|
#define TUNNEL_TYPE_GRE 2
|
||||||
|
#define TUNNEL_TYPE_IP_IN_IP 7
|
||||||
|
|
||||||
|
/* RFC 5512/5640 Sub-TLV Types */
|
||||||
|
#define TUNNEL_SUBTLV_ENCAPSULATION 1
|
||||||
|
#define TUNNEL_SUBTLV_PROTO_TYPE 2
|
||||||
|
#define TUNNEL_SUBTLV_COLOR 4
|
||||||
|
#define TUNNEL_SUBTLV_LOAD_BALANCE 5
|
||||||
|
|
||||||
|
#ifndef offsetof
|
||||||
|
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const value_string bgptypevals[] = {
|
static const value_string bgptypevals[] = {
|
||||||
{ BGP_OPEN, "OPEN Message" },
|
{ BGP_OPEN, "OPEN Message" },
|
||||||
{ BGP_UPDATE, "UPDATE Message" },
|
{ BGP_UPDATE, "UPDATE Message" },
|
||||||
{ BGP_NOTIFICATION, "NOTIFICATION Message" },
|
{ BGP_NOTIFICATION, "NOTIFICATION Message" },
|
||||||
{ BGP_KEEPALIVE, "KEEPALIVE Message" },
|
{ BGP_KEEPALIVE, "KEEPALIVE Message" },
|
||||||
{ BGP_ROUTE_REFRESH, "ROUTE-REFRESH Message" },
|
{ BGP_ROUTE_REFRESH, "ROUTE-REFRESH Message" },
|
||||||
{ BGP_CAPABILITY, "CAPABILITY Message" },
|
{ BGP_CAPABILITY, "CAPABILITY Message" },
|
||||||
{ BGP_ROUTE_REFRESH_CISCO, "Cisco ROUTE-REFRESH Message" },
|
{ BGP_ROUTE_REFRESH_CISCO, "Cisco ROUTE-REFRESH Message" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BGP_MAJOR_ERROR_MSG_HDR 1
|
#define BGP_MAJOR_ERROR_MSG_HDR 1
|
||||||
#define BGP_MAJOR_ERROR_OPEN_MSG 2
|
#define BGP_MAJOR_ERROR_OPEN_MSG 2
|
||||||
#define BGP_MAJOR_ERROR_UPDATE_MSG 3
|
#define BGP_MAJOR_ERROR_UPDATE_MSG 3
|
||||||
#define BGP_MAJOR_ERROR_HT_EXPIRED 4
|
#define BGP_MAJOR_ERROR_HT_EXPIRED 4
|
||||||
#define BGP_MAJOR_ERROR_STATE_MACHINE 5
|
#define BGP_MAJOR_ERROR_STATE_MACHINE 5
|
||||||
#define BGP_MAJOR_ERROR_CEASE 6
|
#define BGP_MAJOR_ERROR_CEASE 6
|
||||||
#define BGP_MAJOR_ERROR_CAP_MSG 7
|
#define BGP_MAJOR_ERROR_CAP_MSG 7
|
||||||
|
|
||||||
static const value_string bgpnotify_major[] = {
|
static const value_string bgpnotify_major[] = {
|
||||||
{ BGP_MAJOR_ERROR_MSG_HDR, "Message Header Error" },
|
{ BGP_MAJOR_ERROR_MSG_HDR, "Message Header Error" },
|
||||||
{ BGP_MAJOR_ERROR_OPEN_MSG, "OPEN Message Error" },
|
{ BGP_MAJOR_ERROR_OPEN_MSG, "OPEN Message Error" },
|
||||||
{ BGP_MAJOR_ERROR_UPDATE_MSG, "UPDATE Message Error" },
|
{ BGP_MAJOR_ERROR_UPDATE_MSG, "UPDATE Message Error" },
|
||||||
{ BGP_MAJOR_ERROR_HT_EXPIRED, "Hold Timer Expired" },
|
{ BGP_MAJOR_ERROR_HT_EXPIRED, "Hold Timer Expired" },
|
||||||
{ BGP_MAJOR_ERROR_STATE_MACHINE, "Finite State Machine Error" },
|
{ BGP_MAJOR_ERROR_STATE_MACHINE, "Finite State Machine Error" },
|
||||||
{ BGP_MAJOR_ERROR_CEASE, "Cease" },
|
{ BGP_MAJOR_ERROR_CEASE, "Cease" },
|
||||||
{ BGP_MAJOR_ERROR_CAP_MSG, "CAPABILITY Message Error" },
|
{ BGP_MAJOR_ERROR_CAP_MSG, "CAPABILITY Message Error" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -117,15 +333,15 @@ static const value_string bgpnotify_minor_open_msg[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string bgpnotify_minor_update_msg[] = {
|
static const value_string bgpnotify_minor_update_msg[] = {
|
||||||
{ 1, "Malformed Attribute List" },
|
{ 1, "Malformed Attribute List" },
|
||||||
{ 2, "Unrecognized Well-known Attribute" },
|
{ 2, "Unrecognized Well-known Attribute" },
|
||||||
{ 3, "Missing Well-known Attribute" },
|
{ 3, "Missing Well-known Attribute" },
|
||||||
{ 4, "Attribute Flags Error" },
|
{ 4, "Attribute Flags Error" },
|
||||||
{ 5, "Attribute Length Error" },
|
{ 5, "Attribute Length Error" },
|
||||||
{ 6, "Invalid ORIGIN Attribute" },
|
{ 6, "Invalid ORIGIN Attribute" },
|
||||||
{ 7, "AS Routing Loop [Deprecated]" },
|
{ 7, "AS Routing Loop [Deprecated]" },
|
||||||
{ 8, "Invalid NEXT_HOP Attribute" },
|
{ 8, "Invalid NEXT_HOP Attribute" },
|
||||||
{ 9, "Optional Attribute Error" },
|
{ 9, "Optional Attribute Error" },
|
||||||
{ 10, "Invalid Network Field" },
|
{ 10, "Invalid Network Field" },
|
||||||
{ 11, "Malformed AS_PATH" },
|
{ 11, "Malformed AS_PATH" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
|
@ -183,21 +399,21 @@ static const value_string as_segment_type[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string bgpattr_type[] = {
|
static const value_string bgpattr_type[] = {
|
||||||
{ BGPTYPE_ORIGIN, "ORIGIN" },
|
{ BGPTYPE_ORIGIN, "ORIGIN" },
|
||||||
{ BGPTYPE_AS_PATH, "AS_PATH" },
|
{ BGPTYPE_AS_PATH, "AS_PATH" },
|
||||||
{ BGPTYPE_NEXT_HOP, "NEXT_HOP" },
|
{ BGPTYPE_NEXT_HOP, "NEXT_HOP" },
|
||||||
{ BGPTYPE_MULTI_EXIT_DISC, "MULTI_EXIT_DISC" },
|
{ BGPTYPE_MULTI_EXIT_DISC, "MULTI_EXIT_DISC" },
|
||||||
{ BGPTYPE_LOCAL_PREF, "LOCAL_PREF" },
|
{ BGPTYPE_LOCAL_PREF, "LOCAL_PREF" },
|
||||||
{ BGPTYPE_ATOMIC_AGGREGATE, "ATOMIC_AGGREGATE" },
|
{ BGPTYPE_ATOMIC_AGGREGATE, "ATOMIC_AGGREGATE" },
|
||||||
{ BGPTYPE_AGGREGATOR, "AGGREGATOR" },
|
{ BGPTYPE_AGGREGATOR, "AGGREGATOR" },
|
||||||
{ BGPTYPE_COMMUNITIES, "COMMUNITIES" },
|
{ BGPTYPE_COMMUNITIES, "COMMUNITIES" },
|
||||||
{ BGPTYPE_ORIGINATOR_ID, "ORIGINATOR_ID" },
|
{ BGPTYPE_ORIGINATOR_ID, "ORIGINATOR_ID" },
|
||||||
{ BGPTYPE_CLUSTER_LIST, "CLUSTER_LIST" },
|
{ BGPTYPE_CLUSTER_LIST, "CLUSTER_LIST" },
|
||||||
{ BGPTYPE_MP_REACH_NLRI, "MP_REACH_NLRI" },
|
{ BGPTYPE_MP_REACH_NLRI, "MP_REACH_NLRI" },
|
||||||
{ BGPTYPE_MP_UNREACH_NLRI, "MP_UNREACH_NLRI" },
|
{ BGPTYPE_MP_UNREACH_NLRI, "MP_UNREACH_NLRI" },
|
||||||
{ BGPTYPE_EXTENDED_COMMUNITY, "EXTENDED_COMMUNITIES" },
|
{ BGPTYPE_EXTENDED_COMMUNITY, "EXTENDED_COMMUNITIES" },
|
||||||
{ BGPTYPE_NEW_AS_PATH, "NEW_AS_PATH" },
|
{ BGPTYPE_NEW_AS_PATH, "NEW_AS_PATH" },
|
||||||
{ BGPTYPE_NEW_AGGREGATOR, "NEW_AGGREGATOR" },
|
{ BGPTYPE_NEW_AGGREGATOR, "NEW_AGGREGATOR" },
|
||||||
{ BGPTYPE_SAFI_SPECIFIC_ATTR, "SAFI_SPECIFIC_ATTRIBUTE" },
|
{ BGPTYPE_SAFI_SPECIFIC_ATTR, "SAFI_SPECIFIC_ATTRIBUTE" },
|
||||||
{ BGPTYPE_TUNNEL_ENCAPS_ATTR, "TUNNEL_ENCAPSULATION_ATTRIBUTE" },
|
{ BGPTYPE_TUNNEL_ENCAPS_ATTR, "TUNNEL_ENCAPSULATION_ATTRIBUTE" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
|
@ -212,70 +428,70 @@ static const value_string tunnel_type[] = {
|
||||||
|
|
||||||
static const value_string subtlv_type[] = {
|
static const value_string subtlv_type[] = {
|
||||||
{ TUNNEL_SUBTLV_ENCAPSULATION, "ENCAPSULATION" },
|
{ TUNNEL_SUBTLV_ENCAPSULATION, "ENCAPSULATION" },
|
||||||
{ TUNNEL_SUBTLV_PROTO_TYPE, "PROTOCOL_TYPE" },
|
{ TUNNEL_SUBTLV_PROTO_TYPE, "PROTOCOL_TYPE" },
|
||||||
{ TUNNEL_SUBTLV_COLOR, "COLOR" },
|
{ TUNNEL_SUBTLV_COLOR, "COLOR" },
|
||||||
{ TUNNEL_SUBTLV_LOAD_BALANCE, "LOAD_BALANCE" },
|
{ TUNNEL_SUBTLV_LOAD_BALANCE, "LOAD_BALANCE" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string bgpext_com8_type[] = {
|
static const value_string bgpext_com8_type[] = {
|
||||||
{ BGP_EXT_COM_QOS_MARK_T, "QoS Marking - transitive" },
|
{ BGP_EXT_COM_QOS_MARK_T, "QoS Marking - transitive" },
|
||||||
{ BGP_EXT_COM_QOS_MARK_NT, "QoS Marking - non-transitive" },
|
{ BGP_EXT_COM_QOS_MARK_NT, "QoS Marking - non-transitive" },
|
||||||
{ BGP_EXT_COM_COS_CAP_T, "CoS Capability - transitive" },
|
{ BGP_EXT_COM_COS_CAP_T, "CoS Capability - transitive" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string bgpext_com_type[] = {
|
static const value_string bgpext_com_type[] = {
|
||||||
{ BGP_EXT_COM_RT_0, "two-octet AS specific Route Target" },
|
{ BGP_EXT_COM_RT_0, "two-octet AS specific Route Target" },
|
||||||
{ BGP_EXT_COM_RT_1, "IPv4 address specific Route Target" },
|
{ BGP_EXT_COM_RT_1, "IPv4 address specific Route Target" },
|
||||||
{ BGP_EXT_COM_RT_2, "four-octet AS specific Route Target" },
|
{ BGP_EXT_COM_RT_2, "four-octet AS specific Route Target" },
|
||||||
{ BGP_EXT_COM_RO_0, "two-octet AS specific Route Origin" },
|
{ BGP_EXT_COM_RO_0, "two-octet AS specific Route Origin" },
|
||||||
{ BGP_EXT_COM_RO_1, "IPv4 address specific Route Origin" },
|
{ BGP_EXT_COM_RO_1, "IPv4 address specific Route Origin" },
|
||||||
{ BGP_EXT_COM_RO_2, "four-octet AS specific Route Origin" },
|
{ BGP_EXT_COM_RO_2, "four-octet AS specific Route Origin" },
|
||||||
{ BGP_EXT_COM_LINKBAND, "Link Bandwidth" },
|
{ BGP_EXT_COM_LINKBAND, "Link Bandwidth" },
|
||||||
{ BGP_EXT_COM_VPN_ORIGIN, "OSPF Domain" },
|
{ BGP_EXT_COM_VPN_ORIGIN, "OSPF Domain" },
|
||||||
{ BGP_EXT_COM_OSPF_RTYPE, "OSPF Route Type" },
|
{ BGP_EXT_COM_OSPF_RTYPE, "OSPF Route Type" },
|
||||||
{ BGP_EXT_COM_OSPF_RID, "OSPF Router ID" },
|
{ BGP_EXT_COM_OSPF_RID, "OSPF Router ID" },
|
||||||
{ BGP_EXT_COM_L2INFO, "Layer 2 Information" },
|
{ BGP_EXT_COM_L2INFO, "Layer 2 Information" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string qos_tech_type[] = {
|
static const value_string qos_tech_type[] = {
|
||||||
{ QOS_TECH_TYPE_DSCP, "DiffServ enabled IP (DSCP encoding)" },
|
{ QOS_TECH_TYPE_DSCP, "DiffServ enabled IP (DSCP encoding)" },
|
||||||
{ QOS_TECH_TYPE_802_1q, "Ethernet using 802.1q priority tag" },
|
{ QOS_TECH_TYPE_802_1q, "Ethernet using 802.1q priority tag" },
|
||||||
{ QOS_TECH_TYPE_E_LSP, "MPLS using E-LSP" },
|
{ QOS_TECH_TYPE_E_LSP, "MPLS using E-LSP" },
|
||||||
{ QOS_TECH_TYPE_VC, "Virtual Channel (VC) encoding" },
|
{ QOS_TECH_TYPE_VC, "Virtual Channel (VC) encoding" },
|
||||||
{ QOS_TECH_TYPE_GMPLS_TIME, "GMPLS - time slot encoding" },
|
{ QOS_TECH_TYPE_GMPLS_TIME, "GMPLS - time slot encoding" },
|
||||||
{ QOS_TECH_TYPE_GMPLS_LAMBDA, "GMPLS - lambda encoding" },
|
{ QOS_TECH_TYPE_GMPLS_LAMBDA, "GMPLS - lambda encoding" },
|
||||||
{ QOS_TECH_TYPE_GMPLS_FIBRE, "GMPLS - fibre encoding" },
|
{ QOS_TECH_TYPE_GMPLS_FIBRE, "GMPLS - fibre encoding" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string bgp_ssa_type[] = {
|
static const value_string bgp_ssa_type[] = {
|
||||||
{ BGP_SSA_L2TPv3 , "L2TPv3 Tunnel" },
|
{ BGP_SSA_L2TPv3 , "L2TPv3 Tunnel" },
|
||||||
{ BGP_SSA_mGRE , "mGRE Tunnel" },
|
{ BGP_SSA_mGRE , "mGRE Tunnel" },
|
||||||
{ BGP_SSA_IPSec , "IPSec Tunnel" },
|
{ BGP_SSA_IPSec , "IPSec Tunnel" },
|
||||||
{ BGP_SSA_MPLS , "MPLS Tunnel" },
|
{ BGP_SSA_MPLS , "MPLS Tunnel" },
|
||||||
{ BGP_SSA_L2TPv3_IN_IPSec , "L2TPv3 in IPSec Tunnel" },
|
{ BGP_SSA_L2TPv3_IN_IPSec , "L2TPv3 in IPSec Tunnel" },
|
||||||
{ BGP_SSA_mGRE_IN_IPSec , "mGRE in IPSec Tunnel" },
|
{ BGP_SSA_mGRE_IN_IPSec , "mGRE in IPSec Tunnel" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string bgp_l2vpn_encaps[] = {
|
static const value_string bgp_l2vpn_encaps[] = {
|
||||||
{ 0, "Reserved"},
|
{ 0, "Reserved"},
|
||||||
{ 1, "Frame Relay"},
|
{ 1, "Frame Relay"},
|
||||||
{ 2, "ATM AAL5 VCC transport"},
|
{ 2, "ATM AAL5 VCC transport"},
|
||||||
{ 3, "ATM transparent cell transport"},
|
{ 3, "ATM transparent cell transport"},
|
||||||
{ 4, "Ethernet VLAN"},
|
{ 4, "Ethernet VLAN"},
|
||||||
{ 5, "Ethernet"},
|
{ 5, "Ethernet"},
|
||||||
{ 6, "Cisco-HDLC"},
|
{ 6, "Cisco-HDLC"},
|
||||||
{ 7, "PPP"},
|
{ 7, "PPP"},
|
||||||
{ 8, "CEM"},
|
{ 8, "CEM"},
|
||||||
{ 9, "ATM VCC cell transport"},
|
{ 9, "ATM VCC cell transport"},
|
||||||
{ 10, "ATM VPC cell transport"},
|
{ 10, "ATM VPC cell transport"},
|
||||||
{ 11, "MPLS"},
|
{ 11, "MPLS"},
|
||||||
{ 12, "VPLS"},
|
{ 12, "VPLS"},
|
||||||
{ 64, "IP-interworking"},
|
{ 64, "IP-interworking"},
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -291,26 +507,26 @@ static const value_string bgpext_ospf_rtype[] = {
|
||||||
|
|
||||||
/* Subsequent address family identifier, RFC2858 */
|
/* Subsequent address family identifier, RFC2858 */
|
||||||
static const value_string bgpattr_nlri_safi[] = {
|
static const value_string bgpattr_nlri_safi[] = {
|
||||||
{ 0, "Reserved" },
|
{ 0, "Reserved" },
|
||||||
{ SAFNUM_UNICAST, "Unicast" },
|
{ SAFNUM_UNICAST, "Unicast" },
|
||||||
{ SAFNUM_MULCAST, "Multicast" },
|
{ SAFNUM_MULCAST, "Multicast" },
|
||||||
{ SAFNUM_UNIMULC, "Unicast+Multicast" },
|
{ SAFNUM_UNIMULC, "Unicast+Multicast" },
|
||||||
{ SAFNUM_MPLS_LABEL, "Labeled Unicast"},
|
{ SAFNUM_MPLS_LABEL, "Labeled Unicast"},
|
||||||
{ SAFNUM_MCAST_VPN, "MCAST-VPN"},
|
{ SAFNUM_MCAST_VPN, "MCAST-VPN"},
|
||||||
{ SAFNUM_ENCAPSULATION, "Encapsulation"},
|
{ SAFNUM_ENCAPSULATION, "Encapsulation"},
|
||||||
{ SAFNUM_TUNNEL, "Tunnel"},
|
{ SAFNUM_TUNNEL, "Tunnel"},
|
||||||
{ SAFNUM_VPLS, "VPLS"},
|
{ SAFNUM_VPLS, "VPLS"},
|
||||||
{ SAFNUM_LAB_VPNUNICAST, "Labeled VPN Unicast" }, /* draft-rosen-rfc2547bis-03 */
|
{ SAFNUM_LAB_VPNUNICAST, "Labeled VPN Unicast" }, /* draft-rosen-rfc2547bis-03 */
|
||||||
{ SAFNUM_LAB_VPNMULCAST, "Labeled VPN Multicast" },
|
{ SAFNUM_LAB_VPNMULCAST, "Labeled VPN Multicast" },
|
||||||
{ SAFNUM_LAB_VPNUNIMULC, "Labeled VPN Unicast+Multicast" },
|
{ SAFNUM_LAB_VPNUNIMULC, "Labeled VPN Unicast+Multicast" },
|
||||||
{ SAFNUM_ROUTE_TARGET, "Route Target Filter" },
|
{ SAFNUM_ROUTE_TARGET, "Route Target Filter" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ORF Type, draft-ietf-idr-route-filter-04.txt */
|
/* ORF Type, draft-ietf-idr-route-filter-04.txt */
|
||||||
static const value_string orf_type_vals[] = {
|
static const value_string orf_type_vals[] = {
|
||||||
{ 2, "Communities ORF-Type" },
|
{ 2, "Communities ORF-Type" },
|
||||||
{ 3, "Extended Communities ORF-Type" },
|
{ 3, "Extended Communities ORF-Type" },
|
||||||
{ 128, "Cisco PrefixList ORF-Type" },
|
{ 128, "Cisco PrefixList ORF-Type" },
|
||||||
{ 129, "Cisco CommunityList ORF-Type" },
|
{ 129, "Cisco CommunityList ORF-Type" },
|
||||||
{ 130, "Cisco Extended CommunityList ORF-Type" },
|
{ 130, "Cisco Extended CommunityList ORF-Type" },
|
||||||
|
@ -347,16 +563,16 @@ static const value_string orf_entry_match_vals[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const value_string capability_vals[] = {
|
static const value_string capability_vals[] = {
|
||||||
{ BGP_CAPABILITY_RESERVED, "Reserved capability" },
|
{ BGP_CAPABILITY_RESERVED, "Reserved capability" },
|
||||||
{ BGP_CAPABILITY_MULTIPROTOCOL, "Multiprotocol extensions capability" },
|
{ BGP_CAPABILITY_MULTIPROTOCOL, "Multiprotocol extensions capability" },
|
||||||
{ BGP_CAPABILITY_ROUTE_REFRESH, "Route refresh capability" },
|
{ BGP_CAPABILITY_ROUTE_REFRESH, "Route refresh capability" },
|
||||||
{ BGP_CAPABILITY_COOPERATIVE_ROUTE_FILTERING, "Cooperative route filtering capability" },
|
{ BGP_CAPABILITY_COOPERATIVE_ROUTE_FILTERING, "Cooperative route filtering capability" },
|
||||||
{ BGP_CAPABILITY_GRACEFUL_RESTART, "Graceful Restart capability" },
|
{ BGP_CAPABILITY_GRACEFUL_RESTART, "Graceful Restart capability" },
|
||||||
{ BGP_CAPABILITY_4_OCTET_AS_NUMBER, "Support for 4-octet AS number capability" },
|
{ BGP_CAPABILITY_4_OCTET_AS_NUMBER, "Support for 4-octet AS number capability" },
|
||||||
{ BGP_CAPABILITY_DYNAMIC_CAPABILITY, "Support for Dynamic capability" },
|
{ BGP_CAPABILITY_DYNAMIC_CAPABILITY, "Support for Dynamic capability" },
|
||||||
{ BGP_CAPABILITY_ADDITIONAL_PATHS, "Support for Additional Paths" },
|
{ BGP_CAPABILITY_ADDITIONAL_PATHS, "Support for Additional Paths" },
|
||||||
{ BGP_CAPABILITY_ROUTE_REFRESH_CISCO, "Route refresh capability" },
|
{ BGP_CAPABILITY_ROUTE_REFRESH_CISCO, "Route refresh capability" },
|
||||||
{ BGP_CAPABILITY_ORF_CISCO, "Cooperative route filtering capability" },
|
{ BGP_CAPABILITY_ORF_CISCO, "Cooperative route filtering capability" },
|
||||||
{ 0, NULL }
|
{ 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,256 +0,0 @@
|
||||||
/* packet-bgp.c
|
|
||||||
* Definitions for BGP packet disassembly structures and routine
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Wireshark - Network traffic analyzer
|
|
||||||
* By Gerald Combs <gerald@wireshark.org>
|
|
||||||
* Copyright 1998 Gerald Combs
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PACKET_BGP_H__
|
|
||||||
#define __PACKET_BGP_H__
|
|
||||||
|
|
||||||
/* some handy things to know */
|
|
||||||
#define BGP_MAX_PACKET_SIZE 4096
|
|
||||||
#define BGP_MARKER_SIZE 16 /* size of BGP marker */
|
|
||||||
#define BGP_HEADER_SIZE 19 /* size of BGP header, including marker */
|
|
||||||
#define BGP_MIN_OPEN_MSG_SIZE 29
|
|
||||||
#define BGP_MIN_UPDATE_MSG_SIZE 23
|
|
||||||
#define BGP_MIN_NOTIFICATION_MSG_SIZE 21
|
|
||||||
#define BGP_MIN_KEEPALVE_MSG_SIZE BGP_HEADER_SIZE
|
|
||||||
#define BGP_TCP_PORT 179
|
|
||||||
#define BGP_ROUTE_DISTINGUISHER_SIZE 8
|
|
||||||
|
|
||||||
/* BGP message types */
|
|
||||||
#define BGP_OPEN 1
|
|
||||||
#define BGP_UPDATE 2
|
|
||||||
#define BGP_NOTIFICATION 3
|
|
||||||
#define BGP_KEEPALIVE 4
|
|
||||||
#define BGP_ROUTE_REFRESH 5
|
|
||||||
#define BGP_CAPABILITY 6
|
|
||||||
#define BGP_ROUTE_REFRESH_CISCO 0x80
|
|
||||||
|
|
||||||
|
|
||||||
/* BGP ROUTE-REFRESH message */
|
|
||||||
struct bgp_route_refresh {
|
|
||||||
guint8 bgpr_marker[BGP_MARKER_SIZE];
|
|
||||||
guint16 bgpr_len;
|
|
||||||
guint8 bgpr_type;
|
|
||||||
guint16 bgpr_afi;
|
|
||||||
guint8 bgpr_reserved;
|
|
||||||
guint8 bgpr_safi;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* path attribute */
|
|
||||||
struct bgp_attr {
|
|
||||||
guint8 bgpa_flags;
|
|
||||||
guint8 bgpa_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* attribute flags, from RFC1771 */
|
|
||||||
#define BGP_ATTR_FLAG_OPTIONAL 0x80
|
|
||||||
#define BGP_ATTR_FLAG_TRANSITIVE 0x40
|
|
||||||
#define BGP_ATTR_FLAG_PARTIAL 0x20
|
|
||||||
#define BGP_ATTR_FLAG_EXTENDED_LENGTH 0x10
|
|
||||||
|
|
||||||
/* SSA flags */
|
|
||||||
#define BGP_SSA_TRANSITIVE 0x8000
|
|
||||||
#define BGP_SSA_TYPE 0x7FFF
|
|
||||||
|
|
||||||
/* SSA Types */
|
|
||||||
#define BGP_SSA_L2TPv3 1
|
|
||||||
#define BGP_SSA_mGRE 2
|
|
||||||
#define BGP_SSA_IPSec 3
|
|
||||||
#define BGP_SSA_MPLS 4
|
|
||||||
#define BGP_SSA_L2TPv3_IN_IPSec 5
|
|
||||||
#define BGP_SSA_mGRE_IN_IPSec 6
|
|
||||||
|
|
||||||
/* AS_PATH segment types */
|
|
||||||
#define AS_SET 1 /* RFC1771 */
|
|
||||||
#define AS_SEQUENCE 2 /* RFC1771 */
|
|
||||||
#define AS_CONFED_SET 4 /* RFC1965 has the wrong values, corrected in */
|
|
||||||
#define AS_CONFED_SEQUENCE 3 /* draft-ietf-idr-bgp-confed-rfc1965bis-01.txt */
|
|
||||||
|
|
||||||
/* OPEN message Optional Parameter types */
|
|
||||||
#define BGP_OPTION_AUTHENTICATION 1 /* RFC1771 */
|
|
||||||
#define BGP_OPTION_CAPABILITY 2 /* RFC2842 */
|
|
||||||
|
|
||||||
/* BGP capability code */
|
|
||||||
#define BGP_CAPABILITY_RESERVED 0 /* RFC2434 */
|
|
||||||
#define BGP_CAPABILITY_MULTIPROTOCOL 1 /* RFC2858 */
|
|
||||||
#define BGP_CAPABILITY_ROUTE_REFRESH 2 /* RFC2918 */
|
|
||||||
#define BGP_CAPABILITY_COOPERATIVE_ROUTE_FILTERING 3 /* draft-ietf-idr-route-filter-04.txt */
|
|
||||||
#define BGP_CAPABILITY_GRACEFUL_RESTART 0x40 /* draft-ietf-idr-restart-05 */
|
|
||||||
#define BGP_CAPABILITY_4_OCTET_AS_NUMBER 0x41 /* draft-ietf-idr-as4bytes-06 */
|
|
||||||
#define BGP_CAPABILITY_DYNAMIC_CAPABILITY 0x42 /* draft-ietf-idr-dynamic-cap-03 */
|
|
||||||
#define BGP_CAPABILITY_ADDITIONAL_PATHS 0x45 /* draft-ietf-idr-add-paths */
|
|
||||||
#define BGP_CAPABILITY_ORF_CISCO 0x82 /* Cisco */
|
|
||||||
#define BGP_CAPABILITY_ROUTE_REFRESH_CISCO 0x80 /* Cisco */
|
|
||||||
|
|
||||||
#define BGP_ORF_PREFIX_CISCO 0x80 /* Cisco */
|
|
||||||
#define BGP_ORF_COMM_CISCO 0x81 /* Cisco */
|
|
||||||
#define BGP_ORF_EXTCOMM_CISCO 0x82 /* Cisco */
|
|
||||||
#define BGP_ORF_ASPATH_CISCO 0x83 /* Cisco */
|
|
||||||
|
|
||||||
#define BGP_ORF_COMM 0x02 /* draft-ietf-idr-route-filter-06.txt */
|
|
||||||
#define BGP_ORF_EXTCOMM 0x03 /* draft-ietf-idr-route-filter-06.txt */
|
|
||||||
#define BGP_ORF_ASPATH 0x04 /* draft-ietf-idr-aspath-orf-02.txt */
|
|
||||||
/* draft-ietf-idr-route-filter-06.txt */
|
|
||||||
#define BGP_ORF_ACTION 0xc0
|
|
||||||
#define BGP_ORF_ADD 0x00
|
|
||||||
#define BGP_ORF_REMOVE 0x40
|
|
||||||
#define BGP_ORF_REMOVEALL 0x80
|
|
||||||
#define BGP_ORF_MATCH 0x20
|
|
||||||
#define BGP_ORF_PERMIT 0x00
|
|
||||||
#define BGP_ORF_DENY 0x20
|
|
||||||
|
|
||||||
/* well-known communities, from RFC1997 */
|
|
||||||
#define BGP_COMM_NO_EXPORT 0xFFFFFF01
|
|
||||||
#define BGP_COMM_NO_ADVERTISE 0xFFFFFF02
|
|
||||||
#define BGP_COMM_NO_EXPORT_SUBCONFED 0xFFFFFF03
|
|
||||||
#define FOURHEX0 0x00000000
|
|
||||||
#define FOURHEXF 0xFFFF0000
|
|
||||||
|
|
||||||
/* attribute types */
|
|
||||||
#define BGPTYPE_ORIGIN 1 /* RFC1771 */
|
|
||||||
#define BGPTYPE_AS_PATH 2 /* RFC1771 */
|
|
||||||
#define BGPTYPE_NEXT_HOP 3 /* RFC1771 */
|
|
||||||
#define BGPTYPE_MULTI_EXIT_DISC 4 /* RFC1771 */
|
|
||||||
#define BGPTYPE_LOCAL_PREF 5 /* RFC1771 */
|
|
||||||
#define BGPTYPE_ATOMIC_AGGREGATE 6 /* RFC1771 */
|
|
||||||
#define BGPTYPE_AGGREGATOR 7 /* RFC1771 */
|
|
||||||
#define BGPTYPE_COMMUNITIES 8 /* RFC1997 */
|
|
||||||
#define BGPTYPE_ORIGINATOR_ID 9 /* RFC2796 */
|
|
||||||
#define BGPTYPE_CLUSTER_LIST 10 /* RFC2796 */
|
|
||||||
#define BGPTYPE_DPA 11 /* work in progress */
|
|
||||||
#define BGPTYPE_ADVERTISER 12 /* RFC1863 */
|
|
||||||
#define BGPTYPE_RCID_PATH 13 /* RFC1863 */
|
|
||||||
#define BGPTYPE_MP_REACH_NLRI 14 /* RFC2858 */
|
|
||||||
#define BGPTYPE_MP_UNREACH_NLRI 15 /* RFC2858 */
|
|
||||||
#define BGPTYPE_EXTENDED_COMMUNITY 16 /* Draft Ramachandra */
|
|
||||||
#define BGPTYPE_NEW_AS_PATH 17 /* draft-ietf-idr-as4bytes */
|
|
||||||
#define BGPTYPE_NEW_AGGREGATOR 18 /* draft-ietf-idr-as4bytes */
|
|
||||||
#define BGPTYPE_SAFI_SPECIFIC_ATTR 19 /* draft-kapoor-nalawade-idr-bgp-ssa-00.txt */
|
|
||||||
#define BGPTYPE_TUNNEL_ENCAPS_ATTR 23 /* RFC5512 */
|
|
||||||
|
|
||||||
/* Extended community type */
|
|
||||||
/* according to IANA's number assignment at: http://www.iana.org/assignments/bgp-extended-communities */
|
|
||||||
#define BGP_EXT_COM_QOS_MARK_T 0x04 /* QoS Marking transitive attribute of regular type (8bit) */
|
|
||||||
#define BGP_EXT_COM_QOS_MARK_NT 0x44 /* QoS Marking non-transitive attribute of regular type (8bit) */
|
|
||||||
/* Format Type(1byte):Flags(1byte):QoS Set(1byte):Tec. Type(1byte): */
|
|
||||||
/* Marking O(2bytes):Marking A(1byte):Proc.Cnt(1byte) */
|
|
||||||
#define BGP_EXT_COM_COS_CAP_T 0x05 /* CoS Capability - Format Type(1byte):Flags(1byte):remaining '0..0' */
|
|
||||||
|
|
||||||
/* draft-ietf-idr-bgp-ext-communities */
|
|
||||||
#define BGP_EXT_COM_RT_0 0x0002 /* Route Target,Format AS(2bytes):AN(4bytes) */
|
|
||||||
#define BGP_EXT_COM_RT_1 0x0102 /* Route Target,Format IP address:AN(2bytes) */
|
|
||||||
#define BGP_EXT_COM_RT_2 0x0202 /* Route Target,Format AS(2bytes):AN(4bytes) */
|
|
||||||
#define BGP_EXT_COM_RO_0 0x0003 /* Route Origin,Format AS(2bytes):AN(4bytes) */
|
|
||||||
#define BGP_EXT_COM_RO_1 0x0103 /* Route Origin,Format IP address:AN(2bytes) */
|
|
||||||
#define BGP_EXT_COM_RO_2 0x0203 /* Route Origin,Format AS(2bytes):AN(4bytes) */
|
|
||||||
#define BGP_EXT_COM_LINKBAND ((BGP_ATTR_FLAG_TRANSITIVE << 8) | 0x0004)
|
|
||||||
/* Link Bandwidth,Format AS(2bytes):
|
|
||||||
* Bandwidth(4bytes) */
|
|
||||||
/* -2 version of the draft */
|
|
||||||
#define BGP_EXT_COM_VPN_ORIGIN 0x0005 /* OSPF Domin ID / VPN of Origin */
|
|
||||||
/* draft-rosen-vpns-ospf-bgp-mpls */
|
|
||||||
#define BGP_EXT_COM_OSPF_RTYPE 0x8000 /* OSPF Route Type,Format Area(4B):RouteType(1B):Options(1B) */
|
|
||||||
#define BGP_EXT_COM_OSPF_RID 0x8001 /* OSPF Router ID,Format RouterID(4B):Unused(2B) */
|
|
||||||
#define BGP_EXT_COM_L2INFO 0x800a /* draft-kompella-ppvpn-l2vpn */
|
|
||||||
|
|
||||||
/* Extended community QoS Marking technology type */
|
|
||||||
#define QOS_TECH_TYPE_DSCP 0x00 /* DiffServ enabled IP (DSCP encoding) */
|
|
||||||
#define QOS_TECH_TYPE_802_1q 0x01 /* Ethernet using 802.1q priority tag */
|
|
||||||
#define QOS_TECH_TYPE_E_LSP 0x02 /* MPLS using E-LSP */
|
|
||||||
#define QOS_TECH_TYPE_VC 0x03 /* Virtual Channel (VC) encoding using separate channels for */
|
|
||||||
/* QoS forwarding / one channel per class (e.g. ATM VCs, FR */
|
|
||||||
/* VCs, MPLS L-LSPs) */
|
|
||||||
#define QOS_TECH_TYPE_GMPLS_TIME 0x04 /* GMPLS - time slot encoding */
|
|
||||||
#define QOS_TECH_TYPE_GMPLS_LAMBDA 0x05 /* GMPLS - lambda encoding */
|
|
||||||
#define QOS_TECH_TYPE_GMPLS_FIBRE 0x06 /* GMPLS - fibre encoding */
|
|
||||||
|
|
||||||
/* OSPF codes for BGP_EXT_COM_OSPF_RTYPE draft-rosen-vpns-ospf-bgp-mpls */
|
|
||||||
#define BGP_OSPF_RTYPE_RTR 1 /* OSPF Router LSA */
|
|
||||||
#define BGP_OSPF_RTYPE_NET 2 /* OSPF Network LSA */
|
|
||||||
#define BGP_OSPF_RTYPE_SUM 3 /* OSPF Summary LSA */
|
|
||||||
#define BGP_OSPF_RTYPE_EXT 5 /* OSPF External LSA, note that ASBR doesn't apply to MPLS-VPN */
|
|
||||||
#define BGP_OSPF_RTYPE_NSSA 7 /* OSPF NSSA External*/
|
|
||||||
#define BGP_OSPF_RTYPE_SHAM 129 /* OSPF-MPLS-VPN Sham link */
|
|
||||||
#define BGP_OSPF_RTYPE_METRIC_TYPE 0x1 /* LSB of RTYPE Options Field */
|
|
||||||
|
|
||||||
/* Extended community & Route dinstinguisher formats */
|
|
||||||
#define FORMAT_AS2_LOC 0x00 /* Format AS(2bytes):AN(4bytes) */
|
|
||||||
#define FORMAT_IP_LOC 0x01 /* Format IP address:AN(2bytes) */
|
|
||||||
#define FORMAT_AS4_LOC 0x02 /* Format AS(4bytes):AN(2bytes) */
|
|
||||||
|
|
||||||
/* RFC 2858 subsequent address family numbers */
|
|
||||||
#define SAFNUM_UNICAST 1
|
|
||||||
#define SAFNUM_MULCAST 2
|
|
||||||
#define SAFNUM_UNIMULC 3
|
|
||||||
#define SAFNUM_MPLS_LABEL 4 /* rfc3107 */
|
|
||||||
#define SAFNUM_MCAST_VPN 5 /* draft-ietf-l3vpn-2547bis-mcast-bgp-08.txt */
|
|
||||||
#define SAFNUM_ENCAPSULATION 7 /* rfc5512 */
|
|
||||||
#define SAFNUM_TUNNEL 64 /* draft-nalawade-kapoor-tunnel-safi-02.txt */
|
|
||||||
#define SAFNUM_VPLS 65
|
|
||||||
#define SAFNUM_LAB_VPNUNICAST 128 /* Draft-rosen-rfc2547bis-03 */
|
|
||||||
#define SAFNUM_LAB_VPNMULCAST 129
|
|
||||||
#define SAFNUM_LAB_VPNUNIMULC 130
|
|
||||||
#define SAFNUM_ROUTE_TARGET 132 /* RFC 4684 Constrained Route Distribution for BGP/MPLS IP VPN */
|
|
||||||
|
|
||||||
/* BGP Additional Paths Capability */
|
|
||||||
#define BGP_ADDPATH_RECEIVE 0x01
|
|
||||||
#define BGP_ADDPATH_SEND 0x02
|
|
||||||
|
|
||||||
/* mcast-vpn route types draft-ietf-l3vpn-2547bis-mcast-bgp-08.txt */
|
|
||||||
#define MCAST_VPN_RTYPE_INTRA_AS_IPMSI_AD 1
|
|
||||||
#define MCAST_VPN_RTYPE_INTER_AS_IPMSI_AD 2
|
|
||||||
#define MCAST_VPN_RTYPE_SPMSI_AD 3
|
|
||||||
#define MCAST_VPN_RTYPE_LEAF_AD 4
|
|
||||||
#define MCAST_VPN_RTYPE_SOURCE_ACTIVE_AD 5
|
|
||||||
#define MCAST_VPN_RTYPE_SHARED_TREE_JOIN 6
|
|
||||||
#define MCAST_VPN_RTYPE_SOURCE_TREE_JOIN 7
|
|
||||||
|
|
||||||
/* RFC 5512 Tunnel Types */
|
|
||||||
#define TUNNEL_TYPE_L2TP_OVER_IP 1
|
|
||||||
#define TUNNEL_TYPE_GRE 2
|
|
||||||
#define TUNNEL_TYPE_IP_IN_IP 7
|
|
||||||
|
|
||||||
/* RFC 5512/5640 Sub-TLV Types */
|
|
||||||
#define TUNNEL_SUBTLV_ENCAPSULATION 1
|
|
||||||
#define TUNNEL_SUBTLV_PROTO_TYPE 2
|
|
||||||
#define TUNNEL_SUBTLV_COLOR 4
|
|
||||||
#define TUNNEL_SUBTLV_LOAD_BALANCE 5
|
|
||||||
|
|
||||||
#ifndef offsetof
|
|
||||||
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
||||||
*
|
|
||||||
* Local variables:
|
|
||||||
* c-basic-offset: 4
|
|
||||||
* tab-width: 8
|
|
||||||
* indent-tabs-mode: nil
|
|
||||||
* End:
|
|
||||||
*
|
|
||||||
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
||||||
* :indentSize=4:tabSize=8:noTabs=true:
|
|
||||||
*/
|
|
|
@ -31,7 +31,12 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "packet-rpc.h"
|
#include "packet-rpc.h"
|
||||||
#include "packet-bootparams.h"
|
|
||||||
|
#define BOOTPARAMSPROC_NULL 0
|
||||||
|
#define BOOTPARAMSPROC_WHOAMI 1
|
||||||
|
#define BOOTPARAMSPROC_GETFILE 2
|
||||||
|
|
||||||
|
#define BOOTPARAMS_PROGRAM 100026
|
||||||
|
|
||||||
static int proto_bootparams = -1;
|
static int proto_bootparams = -1;
|
||||||
static int hf_bootparams_procedure_v1 = -1;
|
static int hf_bootparams_procedure_v1 = -1;
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
/* packet-bootparams.h */
|
|
||||||
/* $Id$
|
|
||||||
*
|
|
||||||
* Wireshark - Network traffic analyzer
|
|
||||||
* By Gerald Combs <gerald@wireshark.org>
|
|
||||||
* Copyright 1998 Gerald Combs
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PACKET_BOOTPARAMS_H
|
|
||||||
#define PACKET_BOOTPARAMS_H
|
|
||||||
|
|
||||||
#define BOOTPARAMSPROC_NULL 0
|
|
||||||
#define BOOTPARAMSPROC_WHOAMI 1
|
|
||||||
#define BOOTPARAMSPROC_GETFILE 2
|
|
||||||
|
|
||||||
#define BOOTPARAMS_PROGRAM 100026
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue