|
#define | PKTLAB_IP4_ADDR_LEN PKTLAB_IPV4_WO_MSK_ADDR_LEN |
|
#define | PKTLAB_IP4_MASK_LEN (PKTLAB_IPV4_W_MSK_ADDR_LEN-PKTLAB_IPV4_W_MSK_ADDR_LEN) |
|
#define | PKTLAB_IP6_ADDR_LEN PKTLAB_IPV6_ADDR_LEN |
|
#define | PKTLAB_IPV4_W_MSK_ADDR_LEN 8 |
|
#define | PKTLAB_IPV4_WO_MSK_ADDR_LEN 4 |
|
#define | PKTLAB_IPV6_ADDR_LEN 16 |
|
#define | PKTLAB_ADDRLEN_MAX PKTLAB_IP6_ADDR_LEN |
|
#define | PKTLAB_PORTLEN_MAX 2 |
|
#define | PKTLAB_DEFAULT_ADDR_STR "127.0.0.1" |
|
#define | PKTLAB_DEFAULT_EXP_PORT_STR "20556" |
| Default controller experiment listening port string.
|
|
#define | PKTLAB_DEFAULT_PUB_PORT_STR "20556" |
| Default broker experiment publication port string.
|
|
#define | PKTLAB_DEFAULT_SUB_PORT_STR "20557" |
| Default broker experiment subscription port string.
|
|
#define | PKTLAB_DEFAULT_SPEC_STR PKTLAB_DEFAULT_ADDR_STR ":" PKTLAB_DEFAULT_EXP_PORT_STR |
|
#define | PKTLAB_MAX_SKT_CNT 0x100 |
| Endpoint maximum pktlab socket count.
|
|
#define | PKTLAB_MAX_LADDR_CNT 0x100 |
| Endpoint maximum exportable local addresses.
|
|
#define | PKTLAB_MAX_LDNSADDR_CNT 0x10 |
| Endpoint maximum exportable local DNS addresses.
|
|
#define | PKTLAB_SHA256_DIGEST_LEN 32 |
|
#define | PKTLAB_ED25519_SIG_LEN 64 |
|
#define | PKTLAB_TICKS_PER_SECOND UINT64_C(1000000000) |
|
#define | PKTLAB_TIME_MAX UINT64_MAX |
|
#define | PKTLAB_XDESCR_DATTR_PAIR_SEP '=' |
|
#define | PKTLAB_XDESCR_DATTR_PAIR_END ';' |
|
#define | PKTLAB_XDESCR_DATTR_NAMELEN_MIN 0x1 |
| Minimum xdescr/dattr pair name length.
|
|
#define | PKTLAB_XDESCR_DATTR_NAMELEN_MAX 0x20 |
| Maximum xdescr/dattr pair name length.
|
|
#define | PKTLAB_XDESCR_DATTR_VALUELEN_MIN 0x1 |
| Minimum xdescr/dattr pair value length.
|
|
#define | PKTLAB_XDESCR_DATTR_VALUELEN_MAX 0x100 |
| Maximum xdescr/dattr pair value length.
|
|
#define | PKTLAB_CHANNELID_LEN_MIN 1 |
|
#define | PKTLAB_CHANNELID_LEN_MAX PKTLAB_SHA256_DIGEST_LEN |
|
#define | PKTLAB_VMEMADDR_CURPKT (0x0) |
|
#define | PKTLAB_VMEMADDR_CURPKT_DATA (PKTLAB_VMEMADDR_CURPKT) |
|
#define | PKTLAB_VMEMADDR_CURPKT_LEN (PKTLAB_VMEMADDR_CURPKT+0x1000000) |
|
#define | PKTLAB_VMEMADDR_CURPKT_SKTID (PKTLAB_VMEMADDR_CURPKT+0x1000010) |
|
#define | PKTLAB_VMEMADDR_CURPKT_SL (0x1000011) |
|
#define | PKTLAB_VMEMADDR_CURPKT_DATA_FL (sizeof(uint8_t)*0x1000000) |
|
#define | PKTLAB_VMEMADDR_CURPKT_LEN_FL (sizeof(uint32_t)) |
|
#define | PKTLAB_VMEMADDR_CURPKT_SKTID_FL (sizeof(uint8_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM (0x10000000) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4NO (PKTLAB_VMEMADDR_SYSPARAM) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6NO (PKTLAB_VMEMADDR_SYSPARAM+0x1) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_TRANSSUP (PKTLAB_VMEMADDR_SYSPARAM+0x2) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_BUFMAXDUP (PKTLAB_VMEMADDR_SYSPARAM+0x6) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4LS (PKTLAB_VMEMADDR_SYSPARAM+0x100) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6LS (PKTLAB_VMEMADDR_SYSPARAM+0x1000) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_TIME (PKTLAB_VMEMADDR_SYSPARAM+0x10000) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_BUFMAX (PKTLAB_VMEMADDR_SYSPARAM+0x10010) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_BUFUSED (PKTLAB_VMEMADDR_SYSPARAM+0x10014) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4DNSNO (PKTLAB_VMEMADDR_SYSPARAM+0x20000) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6DNSNO (PKTLAB_VMEMADDR_SYSPARAM+0x20001) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4DNSLS (PKTLAB_VMEMADDR_SYSPARAM+0x20010) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6DNSLS (PKTLAB_VMEMADDR_SYSPARAM+0x20100) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4HDRMOD (PKTLAB_VMEMADDR_SYSPARAM+0x20200) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6HDRMOD (PKTLAB_VMEMADDR_SYSPARAM+0x20210) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_HOSTID (PKTLAB_VMEMADDR_SYSPARAM+0x30000) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_LATLONG (PKTLAB_VMEMADDR_SYSPARAM+0x30100) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_OSINFO (PKTLAB_VMEMADDR_SYSPARAM+0x30200) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_SL (0x30400) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4NO_FL (sizeof(uint8_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6NO_FL (sizeof(uint8_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_TRANSSUP_FL (sizeof(uint32_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4LS_FL (sizeof(uint8_t)*PKTLAB_IPV4_W_MSK_ADDR_LEN*0x100) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6LS_FL (sizeof(uint8_t)*PKTLAB_IPV6_ADDR_LEN*0x100) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_TIME_FL (sizeof(pktlab_time_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_BUFMAX_FL (sizeof(uint32_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_BUFUSED_FL (sizeof(uint32_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4DNSNO_FL (sizeof(uint8_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6DNSNO_FL (sizeof(uint8_t)) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4DNSLS_FL (sizeof(uint8_t)*PKTLAB_IPV4_WO_MSK_ADDR_LEN*0x10) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6DNSLS_FL (sizeof(uint8_t)*PKTLAB_IPV6_ADDR_LEN*0x10) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP4HDRMOD_FL (sizeof(uint8_t)*0xC) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_IP6HDRMOD_FL (sizeof(uint8_t)*0x8) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_HOSTID_FL (sizeof(char)*0x100) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_LATLONG_FL (sizeof(char)*0x40) |
|
#define | PKTLAB_VMEMADDR_SYSPARAM_OSINFO_FL (sizeof(char)*0x200) |
|
#define | PKTLAB_VMEMADDR_SKTINFO (0x20000000) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_BLKLEN (0x400) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_FAMILY (0x0) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_PROTO (0x1) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_STAT (0x2) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_LADDR (0x10) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RADDR (0x20) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_LPORT (0x30) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RPORT (0x32) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RBUFSZ (0x40) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RBUFUSED (0x44) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_DROPSTAT (0x50) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_NSENDERR (0x60) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_NSENDERRTAG (0x61) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_NOTIFMASK (0x70) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_CTFL (0x100) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_SL (PKTLAB_VMEMADDR_SKTINFO_BLKLEN*0x100) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_PROTO_FL (sizeof(uint8_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_STAT_FL (sizeof(int8_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_LADDR_FL (sizeof(uint8_t)*PKTLAB_ADDRLEN_MAX) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RADDR_FL (sizeof(uint8_t)*PKTLAB_ADDRLEN_MAX) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_LPORT_FL (sizeof(uint16_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RPORT_FL (sizeof(uint16_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RBUFSZ_FL (sizeof(uint32_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_RBUFUSED_FL (sizeof(uint32_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_DROPSTAT_FL (sizeof(uint32_t)*2) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_NSENDERR_FL (sizeof(int8_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_NSENDERRTAG_FL (sizeof(uint16_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_NOTIFMASK_FL (sizeof(uint16_t)) |
|
#define | PKTLAB_VMEMADDR_SKTINFO_CTFL_FL (sizeof(uint8_t)*0x80) |
|
#define | PKTLAB_VMEMADDR_NSENDTSTP (0x30000000) |
|
#define | PKTLAB_VMEMADDR_MONSCRATCH (0x40000000) |
|
#define | PKTLAB_VMEMADDR_MONPERSIST (0x50000000) |
|
#define | PKTLAB_VMEMADDR_NSENDTSTP_SL (sizeof(pktlab_time_t)*0x10000) |
|
#define | PKTLAB_VMEMADDR_MONSCRATCH_SL (sizeof(uint8_t)*0x10000000) |
|
#define | PKTLAB_VMEMADDR_MONPERSIST_SL (sizeof(uint8_t)*0x10000000) |
|
#define | PKTLAB_RAW_SUP_BIT_INDX 0 |
|
#define | PKTLAB_TCP_SUP_BIT_INDX 1 |
|
#define | PKTLAB_UDP_SUP_BIT_INDX 2 |
|
#define | PKTLAB_NOTIFMASK_NTAG (0x1 << 1) |
|
#define | PKTLAB_NOTIFMASK_NSTAT (0x1 << 2) |
|
#define | PKTLAB_NOTIFMASK_NDATA (0x1 << 3) |
|
#define | PKTLAB_NOTIFMASK_NDROP (0x1 << 4) |
|
#define | PKTLAB_MREAD_MAX UINT32_C(0x10000) |
|
#define | PKTLAB_NDATA_MAX UINT32_C(0x10000) |
|
#define | PKTLAB_IP4_PROTO 0x4 |
| Defined IPv4 protocol family value. More...
|
|
#define | PKTLAB_IP6_PROTO 0x6 |
| Defined IPv6 protocol family value. More...
|
|
#define | PKTLAB_RAW_PROTO 0x00 |
| Defined raw socket protocol value. More...
|
|
#define | PKTLAB_TCP_PROTO 0x06 |
| Defined TCP socket protocol value. More...
|
|
#define | PKTLAB_UDP_PROTO 0x11 |
| Defined UDP socket protocol value. More...
|
|
#define | PKTLAB_NCTL_TCP_FIN 0x1 |
| Defined nctl TCP fin command. More...
|
|
#define | PKTLAB_TCPEV_ESTABLISHED 0x0 |
| Defined nstat code value - TCP connection established event.
|
|
#define | PKTLAB_TCPEV_RESET 0x1 |
| Defined nstat code value - TCP connection reset event.
|
|
#define | PKTLAB_TCPEV_TIMEOUT 0x2 |
| Defined nstat code value - TCP connection timeout event.
|
|
#define | PKTLAB_TCPEV_PEERCLOSED 0x3 |
| Defined nstat code value - TCP connection peer closed event.
|
|
#define | PKTLAB_TCPEV_UNKNOWN 0xFF |
| Defined nstat code value - TCP connection unknown event.
|
|
#define | PKTLAB_HLEN 4 |
| Encoded pktlab message header length.
|
|
#define | PKTLAB_ENCODE_IOVCNT 5 |
| Minimum required iovec elements for pktlab_encode_message().
|
|
#define | PKTLAB_ENCODE_BUFSZ (PKTLAB_HLEN+32) |
| Minimum required buffer size for pktlab_encode_message().
|
|
#define | PKTLAB_PUBLICKEY_LEN 32 |
| Raw public key length for pktlab keys in bytes. More...
|
|
#define | PKTLAB_PRIVATEKEY_LEN 32 |
| Raw private key length for pktlab keys in bytes. More...
|
|
#define | PKTLAB_KEYID_LEN PKTLAB_SHA256_DIGEST_LEN |
| Key identifier length for pktlab keys in bytes. More...
|
|
#define | PKTLAB_SIGNATURE_LEN PKTLAB_ED25519_SIG_LEN |
| Raw signature length for pktlab keys in bytes. More...
|
|
#define | PKTLAB_DEL_TYPE_EXPPRIV 0x1 |
| Defined delegated privilege type value - experiment privilege.
|
|
#define | PKTLAB_DEL_TYPE_REPPRIV 0x2 |
| Defined delegated privilege type value - representation privilege.
|
|
#define | PKTLAB_FILTER_DIGEST_LEN PKTLAB_SHA256_DIGEST_LEN |
| pktlab filter program digest length. More...
|
|
#define | PKTLAB_MONITOR_DIGEST_LEN PKTLAB_SHA256_DIGEST_LEN |
| pktlab monitor program digest length. More...
|
|
#define | PKTLAB_EXT_CERT_TYPE "1.2.3.1" |
|
#define | PKTLAB_EXT_CERT_DESCRIPTION "1.2.3.3" |
|
#define | PKTLAB_EXT_FILTER_DIGESTS "1.2.3.5" |
|
#define | PKTLAB_EXT_MONITOR_DIGESTS "1.2.3.6" |
|
#define | PKTLAB_EXT_PRIORITY "1.2.3.7" |
|
#define | PKTLAB_EXT_DEL_TYPE "1.2.3.8" |
|
#define | PKTLAB_CERTTYPE_STR_SUBCMD "subcmd" |
|
#define | PKTLAB_CERTTYPE_STR_PUBCMD "pubcmd" |
|
#define | PKTLAB_CERTTYPE_STR_EXPPRIV "exppriv" |
|
#define | PKTLAB_CERTTYPE_STR_DELPRIV "delpriv" |
|
#define | PKTLAB_CERTTYPE_STR_AGENT "agent" |
|
#define | PKTLAB_CERTTYPE_STR_UNKNOWN "unknown" |
|
#define | pktlab_get16n pktlab_get16b |
|
#define | pktlab_get24n pktlab_get24b |
|
#define | pktlab_get32n pktlab_get32b |
|
#define | pktlab_get64n pktlab_get64b |
|
#define | pktlab_set16n pktlab_set16b |
|
#define | pktlab_set24n pktlab_set24b |
|
#define | pktlab_set32n pktlab_set32b |
|
#define | pktlab_set64n pktlab_set64b |
|
|
enum | pktlab_filter_type { PKTLAB_CBPF = 0x0
, PKTLAB_EBPF = 0x1
} |
| pktlab defined filter types. More...
|
|
enum | pktlab_uri_type { EXP_URI_TYPE = 0
, BROKER_URI_TYPE = 1
, MALFORMED_URI_TYPE = -1
} |
| pktlab defined URI types. More...
|
|
enum | pktlab_rawhdr_info { PKTLAB_RAWHDR_NOCHG = 0
, PKTLAB_RAWHDR_CHG = 1
, PKTLAB_RAWHDR_0FILL = 2
} |
|
enum | pktlab_socket_state {
PKTLAB_SKTST_FREE = 0
, PKTLAB_SKTST_OPENING = 1
, PKTLAB_SKTST_OPEN = 2
, PKTLAB_SKTST_EOF = 3
,
PKTLAB_SKTST_WFIN = 4
, PKTLAB_SKTST_END = 5
, PKTLAB_SKTST_REFUSED = -1
, PKTLAB_SKTST_RESET = -2
,
PKTLAB_SKTST_TIMEDOUT = -3
, PKTLAB_SKTST_UNREACH = -4
, PKTLAB_SKTST_UNKFAULT = -128
} |
|
enum | pktlab_nsend_err {
PKTLAB_NSEND_SUCCESS = 0
, PKTLAB_NSEND_NORES = 1
, PKTLAB_NSEND_BADPKT = 2
, PKTLAB_NSEND_TIMEDOUT = 3
,
PKTLAB_NSEND_RESET = 4
, PKTLAB_NSEND_UNREACH = 5
, PKTLAB_NSEND_WFIN = 6
, PKTLAB_NSEND_UNKFAULT = 127
} |
|
enum | pktlab_message_type {
PKTLAB_UNDEF_MESSAGE = 0x00
, PKTLAB_CDATA_MESSAGE = 0x20
, PKTLAB_START_MESSAGE = 0x21
, PKTLAB_END_MESSAGE = 0x22
,
PKTLAB_YIELD_MESSAGE = 0X23
, PKTLAB_CONT_MESSAGE = 0X24
, PKTLAB_MREAD_MESSAGE = 0x28
, PKTLAB_MWRITE_MESSAGE = 0x29
,
PKTLAB_NOPEN_MESSAGE = 0x2A
, PKTLAB_NCLOSE_MESSAGE = 0x2B
, PKTLAB_NSEND_MESSAGE = 0x2C
, PKTLAB_NCAP_MESSAGE = 0x2D
,
PKTLAB_NCTL_MESSAGE = 0x2E
, PKTLAB_XCERT_MESSAGE = 0x30
, PKTLAB_XPUB_MESSAGE = 0x31
, PKTLAB_XSUB_MESSAGE = 0x38
,
PKTLAB_RESULT_MESSAGE = 0x40
, PKTLAB_MDATA_MESSAGE = 0x41
, PKTLAB_NTAG_MESSAGE = 0x60
, PKTLAB_NSTAT_MESSAGE = 0x61
,
PKTLAB_NDATA_MESSAGE = 0x62
, PKTLAB_NDROP_MESSAGE = 0x63
, PKTLAB_SUSPD_MESSAGE = 0x68
, PKTLAB_RESUMD_MESSAGE = 0x69
,
PKTLAB_XNOTIFY_MESSAGE = 0x70
, PKTLAB_XREG_MESSAGE = 0x80
} |
| pktlab defined message types. More...
|
|
enum | pktlab_status {
PKTLAB_SUCCESS = 0
, PKTLAB_ECTLBADMSG = 0x10
, PKTLAB_ECTLNOTSUP = 0x11
, PKTLAB_ECRTNOMATCH = 0x20
,
PKTLAB_ECRTATTACH = 0x21
, PKTLAB_ECRTBADFRM = 0x22
, PKTLAB_ECRTNOSPACE = 0x23
, PKTLAB_ESYSNOBUFS = 0x30
,
PKTLAB_ESYSNOPERM = 0x31
, PKTLAB_ESKTINUSE = 0x32
, PKTLAB_ESKTNOTOPEN = 0x33
, PKTLAB_ESKTNOPRFAM = 0x34
,
PKTLAB_ESKTNOPROTO = 0x35
, PKTLAB_ESKTNOADDR = 0x36
, PKTLAB_ESKTNOMATCH = 0x37
, PKTLAB_ESKTBADFILT = 0x38
,
PKTLAB_ETCPNOPORT = 0x40
, PKTLAB_ETCPNOSEND = 0x41
, PKTLAB_EUDPNOPORT = 0x42
, PKTLAB_EPUBBADCH = 0x50
,
PKTLAB_EPUBBADADDR = 0x51
, PKTLAB_EPUBBADENDT = 0x52
, PKTLAB_EPUBBADPR = 0x53
, PKTLAB_EPUBBADXD = 0x54
,
PKTLAB_ESUBBADCH = 0x60
, PKTLAB_EUNKFAULT = 0xFFFF
} |
| pktlab defined errid values. More...
|
|
enum | pktlab_cert_type {
PKTLAB_CERT_SUBCMD = 0
, PKTLAB_CERT_PUBCMD = 1
, PKTLAB_CERT_EXPPRIV = 2
, PKTLAB_CERT_DELPRIV = 3
,
PKTLAB_CERT_AGENT = 4
, PKTLAB_CERT_UNKNOWN = 127
} |
| pktlab defined certificate types.
|
|
enum | pktlab_decode_rst {
PKTLAB_DECODE_SUCCESS = 0
, PKTLAB_DECODE_INVAL = 1
, PKTLAB_DECODE_BAD_SIGALG = 2
, PKTLAB_DECODE_BAD_SIGNATURE = 3
,
PKTLAB_DECODE_BAD_X509_VER = 4
, PKTLAB_DECODE_USING_UNUSED_FIELD = 5
, PKTLAB_DECODE_BAD_CERT_TYPE = 6
, PKTLAB_DECODE_BAD_KEYUSAGE = 7
,
PKTLAB_DECODE_BAD_SERIAL = 8
, PKTLAB_DECODE_BAD_VALIDITY = 9
, PKTLAB_DECODE_BAD_SUBJ_PUBKEY = 10
, PKTLAB_DECODE_BAD_AID = 11
,
PKTLAB_DECODE_BAD_SID = 12
, PKTLAB_DECODE_BAD_BC = 13
, PKTLAB_DECODE_BAD_CERT_DESC = 14
, PKTLAB_DECODE_BAD_PRIORITY = 15
,
PKTLAB_DECODE_BAD_FILTER_DIGESTS = 16
, PKTLAB_DECODE_BAD_MONITOR_DIGESTS = 17
, PKTLAB_DECODE_BAD_DEL_TYPE = 18
, PKTLAB_DECODE_UNKNOWN_FAULT = 127
} |
| pktlab certificate decoding result values. More...
|
|
enum | pktlab_auth_mode { PKTLAB_CONTROLLER_AUTH_ENDPOINT = 0
, PKTLAB_ENDPOINT_AUTH_CONTROLLER = 1
, PKTLAB_AUTH_AGENT = 2
, PKTLAB_NO_VERIFY = 127
} |
| pktlab certificate chain verification mode values. More...
|
|
enum | pktlab_verify_rst {
PKTLAB_VERIFY_SUCCESS = 0
, PKTLAB_VERIFY_INVAL = 1
, PKTLAB_VERIFY_BAD_CERT = 2
, PKTLAB_VERIFY_NOT_ENOUGH_CERT = 3
,
PKTLAB_VERIFY_TOO_MANY_CERT = 4
, PKTLAB_VERIFY_UNEXPECTED_CERT = 5
, PKTLAB_VERIFY_EXPIRED_CERT = 6
, PKTLAB_VERIFY_NO_MATCHING_SIGN_KEY = 7
,
PKTLAB_VERIFY_PATHLEN_EXCEEDED = 8
, PKTLAB_VERIFY_END_OF_PHASES = 9
, PKTLAB_VERIFY_BAD_DEL_TYPE = 10
, PKTLAB_VERIFY_UNKNOWN_FAULT = 127
} |
| pktlab certificate chain verification result values. More...
|
|
enum | pktlab_parse_cert_chain_rst {
PKTLAB_PARSE_CHAIN_SUCCESS = 0
, PKTLAB_PARSE_CHAIN_INVAL = 1
, PKTLAB_PARSE_CHAIN_BAD_CHAIN = 2
, PKTLAB_PARSE_CHAIN_BAD_KEY = 3
,
PKTLAB_PARSE_CHAIN_UNKNOWN_FAULT = 127
} |
| pktlab certificate chain parsing result values. More...
|
|
|
pktlab_time_t | pktlab_time_now (void) |
| Get current pktlab time. More...
|
|
static pktlab_time_t | pktlab_time_sec (uint_fast32_t sec) |
| Convert seconds to pktlab ticks. More...
|
|
static pktlab_time_t | pktlab_timeval_to_time (const struct timeval *tv) |
| Convert time period in struct timeval to pktlab ticks. More...
|
|
static void | pktlab_time_to_timeval (pktlab_time_t t, struct timeval *tv) |
| Convert time period in pktlab ticks to struct timeval. More...
|
|
static uint_fast32_t | pktlab_time_to_unix_time (pktlab_time_t t) |
| Convert a pktlab time to Unix time (in second precision). More...
|
|
pktlab_time_t | pktlab_tm_to_time (const struct tm *tm) |
| Convert time in struct tm to pktlab time. More...
|
|
int | pktlab_decode_xdescr (const char *xdescr, uint_fast32_t xdescrlen, struct pktlab_xdescr_dattr_pair **pairs, uint_fast32_t *paircnt) |
| Decode an encoded experiment descriptor (xdescr) string. More...
|
|
int | pktlab_encode_xdescr (const struct pktlab_xdescr_dattr_pair *pairs, uint_fast32_t paircnt, char *buf, uint_fast32_t buflen, uint_fast32_t *used) |
| Encode an experiment descriptor (xdescr) string. More...
|
|
int | pktlab_decode_dattr (const char *dattr, uint_fast32_t dattrlen, struct pktlab_xdescr_dattr_pair **pairs, uint_fast32_t *paircnt) |
| Decode an encoded endpoint attribute (dattr) string. More...
|
|
int | pktlab_encode_dattr (const struct pktlab_xdescr_dattr_pair *pairs, uint_fast32_t paircnt, char *buf, uint_fast32_t buflen, uint_fast32_t *used) |
| Encode an endpoint attribute (dattr) string. More...
|
|
bool | pktlab_xdescr_dattr_match (const char *xdescr, uint_fast32_t xdescrlen, const char *dattr, uint_fast32_t dattrlen) |
| Match an experiment descriptor (xdescr) string to an endpoint attribute (dattr) string. More...
|
|
int | pktlab_encode_chlist (const struct pktlab_channel *channels, void **chlistptr, uint_fast32_t *chlistlen) |
| Encode a channel list. More...
|
|
int | pktlab_decode_chlist (const void *chlistptr, uint_fast32_t chlistlen, struct pktlab_channel **channels) |
| Decode a channel list. More...
|
|
void | pktlab_free_channels (struct pktlab_channel *channels) |
| Free an allocated channel linked list. More...
|
|
int | pktlab_parse_uri (struct pktlab_uri *restrict uri_info, const void *restrict ptr, uint_fast32_t len) |
| Decode a pktlab URI. More...
|
|
void | pktlab_vmem_read (const struct pktlab_vmem_region *restrict rgn, uint_fast32_t rgncnt, uint_fast32_t addr, uint_fast32_t len, void *restrict dst) |
|
void | pktlab_vmem_write (const struct pktlab_vmem_region *restrict rgn, uint_fast32_t rgncnt, uint_fast32_t addr, uint_fast32_t len, const void *restrict src) |
|
void | pktlab_buffer_reader (const struct pktlab_vmem_region *restrict rgn, uint_fast32_t addr, uint_fast32_t len, void *restrict dst) |
|
void | pktlab_buffer_writer (const struct pktlab_vmem_region *restrict rgn, uint_fast32_t addr, uint_fast32_t len, const void *restrict src) |
|
size_t | pktlab_decode_message (struct pktlab_message *restrict msg, const void *restrict ptr, size_t len) |
| Decode pktlab message. More...
|
|
int | pktlab_encode_message (const struct pktlab_message *restrict msg, void *restrict buf, struct iovec *restrict iov) |
| Encode pktlab message. More...
|
|
struct pktlab_message * | pktlab_create_result_message (enum pktlab_status status) |
| Get fields-set pktlab result message. More...
|
|
struct pktlab_reader * | pktlab_create_reader (pktlab_read_t read, void *aux) |
| Get initialized pktlab reader struct. More...
|
|
void | pktlab_close_reader (struct pktlab_reader *r) |
| Close and free pktlab reader struct. More...
|
|
void * | pktlab_reader_readaux (const struct pktlab_reader *r) |
| Get pktlab reader struct aux information. More...
|
|
int | pktlab_read_message (struct pktlab_reader *restrict r, struct pktlab_message **restrict msgptr) |
| pktlab reader read message. More...
|
|
struct pktlab_writer * | pktlab_create_writer (pktlab_write_t write, void *aux) |
| Get initialized pktlab writer struct. More...
|
|
void | pktlab_close_writer (struct pktlab_writer *w) |
| Close and free pktlab writer struct. More...
|
|
int | pktlab_flush_writer (struct pktlab_writer *w) |
| Flush pktlab writer internal buffer. More...
|
|
size_t | pktlab_writer_unsent (const struct pktlab_writer *w) |
| Get writer internal buffered content length. More...
|
|
void * | pktlab_writer_writeaux (const struct pktlab_writer *w) |
| Get pktlab writer struct aux information. More...
|
|
int | pktlab_write_message (struct pktlab_writer *restrict w, const struct pktlab_message *restrict msg) |
| pktlab writer write message. More...
|
|
const char * | pktlab_sktstate_name (enum pktlab_socket_state state) |
| Get text description of pktlab endpoint skt state. More...
|
|
struct pktlab_publickey * | pktlab_create_publickey (void) |
| Allocate initialized pktlab public key struct. More...
|
|
int | pktlab_load_publickey_pem (const char *pem, uint_fast32_t pemlen, struct pktlab_publickey *k) |
| Load pktlab public key struct via PEM-encoded public key char array. More...
|
|
int | pktlab_load_publickey_der (const uint8_t *der, uint_fast32_t derlen, struct pktlab_publickey *k) |
| Load pktlab public key struct via raw SubjectPublicKeyInfo byte array. More...
|
|
int | pktlab_load_publickey_raw (const uint8_t *bytes, uint_fast32_t len, struct pktlab_publickey *k) |
| Load pktlab public key struct via raw public key byte array. More...
|
|
int | pktlab_cleanup_publickey (struct pktlab_publickey *k) |
| Free an allocated pktlab public key struct. More...
|
|
int | pktlab_get_publickey_bytes (const struct pktlab_publickey *k, void *buf, uint_fast32_t buflen) |
| Get raw public key byte array from loaded pktlab public key struct. More...
|
|
int | pktlab_get_key_identifier (const struct pktlab_publickey *k, void *buf, uint_fast32_t buflen) |
| Get key identifier for a loaded pktlab public key struct. More...
|
|
struct pktlab_privatekey * | pktlab_create_privatekey (void) |
| Allocate initialized pktlab private key struct. More...
|
|
int | pktlab_load_privatekey_pem (const char *pem, uint_fast32_t pemlen, const char *passphrase, struct pktlab_privatekey *k) |
| Load pktlab private key struct via PEM-encoded private key char array. More...
|
|
int | pktlab_load_privatekey_der (const uint8_t *der, uint_fast32_t derlen, const char *passphrase, struct pktlab_privatekey *k) |
| Load pktlab private key struct via raw PKCS8 byte array. More...
|
|
int | pktlab_load_privatekey_raw (const uint8_t *bytes, uint_fast32_t len, struct pktlab_privatekey *k) |
| Load pktlab private key struct via raw private key byte array. More...
|
|
int | pktlab_cleanup_privatekey (struct pktlab_privatekey *k) |
| Free an allocated pktlab private key struct. More...
|
|
int | pktlab_get_privatekey_bytes (const struct pktlab_privatekey *k, void *buf, uint_fast32_t buflen) |
| Get raw private key byte array from loaded pktlab private key struct. More...
|
|
struct pktlab_publickey * | pktlab_get_publickey_from_privatekey (const struct pktlab_privatekey *k) |
| Get loaded pktlab public key struct from loaded pktlab private key struct. More...
|
|
struct pktlab_certificate * | pktlab_create_cert (void) |
| Allocate initialized pktlab certificate struct. More...
|
|
int | pktlab_load_cert_pem (const char *pem, uint_fast32_t pemlen, struct pktlab_certificate *cert) |
| Load pktlab certificate struct via PEM-encoded pktlab certificate char array. More...
|
|
int | pktlab_load_cert_der (const uint8_t *der, uint_fast32_t derlen, struct pktlab_certificate *cert) |
| Load pktlab certificate struct via DER-encode pktlab certificate byte array. More...
|
|
int | pktlab_get_cert_der (const struct pktlab_certificate *cert, void **der, uint_fast32_t *derlen) |
| Get DER-encoded pktlab certificate bytes from loaded pktlab certificate struct. More...
|
|
int | pktlab_decode_certificate (const struct pktlab_certificate *cert, const struct pktlab_publickey *signkey, struct pktlab_cert_info **ptr) |
| Decode pktlab certificate information from loaded pktlab certificate struct. More...
|
|
int | pktlab_verify_certificate_signature (const struct pktlab_certificate *cert, const struct pktlab_publickey *signkey) |
| Verify the pktlab certificate signature. More...
|
|
int | pktlab_cleanup_cert (struct pktlab_certificate *cert) |
| Free an allocated pktlab certificate struct. More...
|
|
const char * | pktlab_cert_type_name (int cert_type) |
| Get pktlab certificate type string from pktlab certificate type value. More...
|
|
int | pktlab_cert_type_name_to_id (const char *name) |
| Get pktlab certificate type value from pktlab certificate type string. More...
|
|
int | pktlab_get_agent_key (const struct pktlab_certificate *agent_cert, uint8_t *agent_pubkey) |
| Get pktlab agent certificate subject (signee) public key. More...
|
|
int | pktlab_verify_cert_chain (int auth_mode, struct pktlab_certificate **cert_ls, struct pktlab_publickey **root_ls, struct pktlab_certificate ***verified_cert_ls, uint_fast32_t certnum, uint_fast32_t rootnum, uint_fast32_t *verified_certnum, uint_fast32_t *used_root_indx) |
| Verify pktlab certificate chain. More...
|
|
int | pktlab_parse_endpoint_rep_cert_chain (struct pktlab_certificate **cert_ls, uint_fast32_t certnum, const uint8_t *endpoint_key, struct pktlab_publickey *root_eop_key, uint8_t **subable_channels, uint_fast32_t *channelnum) |
| Parse pktlab endpoint representation privilege certificate chain for subscribable channel information. More...
|
|
int | pktlab_parse_controller_exp_cert_chain (struct pktlab_certificate **cert_ls, uint_fast32_t certnum, const uint8_t *controller_key, struct pktlab_publickey *trusted_eop_key, uint8_t **ftdigests, uint_fast32_t *ftcnt, uint8_t **mtdigests, uint_fast32_t *mtcnt, char ***priorities, uint_fast32_t *pcnt, uint8_t *subable_channel) |
| Parse pktlab controller experiment privilege certificate chain for subscribable channel and experiment privilege information. More...
|
|
static uint_fast8_t | pktlab_get8 (const void *ptr) |
| Get 8-bit unsigned integer from byte array. More...
|
|
static uint_fast16_t | pktlab_get16b (const void *ptr) |
|
static uint_fast16_t | pktlab_get16l (const void *ptr) |
|
static uint_fast32_t | pktlab_get24b (const void *ptr) |
|
static uint_fast32_t | pktlab_get24l (const void *ptr) |
|
static uint_fast32_t | pktlab_get32b (const void *ptr) |
|
static uint_fast32_t | pktlab_get32l (const void *ptr) |
|
static uint_fast64_t | pktlab_get64b (const void *ptr) |
|
static uint_fast64_t | pktlab_get64l (const void *ptr) |
|
static void | pktlab_set8 (void *ptr, uint_fast8_t val) |
| Set 8-bit unsigned integer to byte array. More...
|
|
static void | pktlab_set16b (void *ptr, uint_fast16_t val) |
|
static void | pktlab_set16l (void *ptr, uint_fast16_t val) |
|
static void | pktlab_set24b (void *ptr, uint_fast32_t val) |
|
static void | pktlab_set24l (void *ptr, uint_fast32_t val) |
|
static void | pktlab_set32b (void *ptr, uint_fast32_t val) |
|
static void | pktlab_set32l (void *ptr, uint_fast32_t val) |
|
static void | pktlab_set64b (void *ptr, uint_fast64_t val) |
|
static void | pktlab_set64l (void *ptr, uint_fast64_t val) |
|
static uint_fast16_t | pktlab_hton16 (uint_fast16_t x) |
| Convert 16-bit unsigned integer from host byte order to network byte order. More...
|
|
static uint_fast32_t | pktlab_hton32 (uint_fast32_t x) |
|
static uint_fast64_t | pktlab_hton64 (uint_fast64_t x) |
|
static uint_fast16_t | pktlab_ntoh16 (uint_fast16_t x) |
|
static uint_fast32_t | pktlab_ntoh32 (uint_fast32_t x) |
|
static uint_fast64_t | pktlab_ntoh64 (uint_fast64_t x) |
|
static bool | pktlab_getbit8 (uint_fast8_t bits, uint_fast8_t pos) |
| Get bit from unsigned integer at bit position. More...
|
|
static bool | pktlab_getbit16 (uint_fast16_t bits, uint_fast8_t pos) |
|
static bool | pktlab_getbit32 (uint_fast32_t bits, uint_fast8_t pos) |
|
static bool | pktlab_getbit64 (uint_fast64_t bits, uint_fast8_t pos) |
|
static uint_fast8_t | pktlab_setbit8 (uint_fast8_t bits, uint_fast8_t pos) |
| Set bit in unsigned integer at bit position. More...
|
|
static uint_fast16_t | pktlab_setbit16 (uint_fast16_t bits, uint_fast8_t pos) |
|
static uint_fast32_t | pktlab_setbit32 (uint_fast32_t bits, uint_fast8_t pos) |
|
static uint_fast64_t | pktlab_setbit64 (uint_fast64_t bits, uint_fast8_t pos) |
|
static uint_fast8_t | pktlab_clrbit8 (uint_fast8_t bits, uint_fast8_t pos) |
| Clear bit in unsigned integer at bit position. More...
|
|
static uint_fast16_t | pktlab_clrbit16 (uint_fast16_t bits, uint_fast8_t pos) |
|
static uint_fast32_t | pktlab_clrbit32 (uint_fast32_t bits, uint_fast8_t pos) |
|
static uint_fast64_t | pktlab_clrbit64 (uint_fast64_t bits, uint_fast8_t pos) |
|