summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-03-31 09:36:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-04-27 19:13:10 -0700
commit1f6143b4386b750ae9e732a6c591cdca73d2b2df (patch)
tree68ed3697fefedda6cdade6191ef838e66c400e12 /include
parent4ae6b302d6a15fe25a60f4fc85a441e8a3c6e7f4 (diff)
Allow test programs to provide responses to selected QueryExtension calls
Allows them to provide their own psuedo-implementations of Extensions. If the sequence in a response is set to XHIV_SEQ_MATCHDATA, then the new match_data field has a pointer to additional matching constraints. So far only X_QueryExtension will check those, and it expects a null terminated extension name string to match against the queried extension. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/xhiv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/xhiv.h b/include/xhiv.h
index 426918c..26b0036 100644
--- a/include/xhiv.h
+++ b/include/xhiv.h
@@ -31,7 +31,8 @@
#define XHIV_REQ_IGNORE 1024 /* Match only seq number, not req code */
#define XHIV_REQ_CONN_SETUP 1025 /* Initial handshake */
-#define XHIV_SEQ_IGNORE 0xFFFFFFFF /* Match only req code, not seq number */
+#define XHIV_SEQ_IGNORE 0xFFFFFFFF /* Match only req code, not seq number */
+#define XHIV_SEQ_MATCHDATA 0xFFFFFFFE /* Match only if match_data matches */
#define XHIV_NO_SET_SEQUENCE 0x01 /* Don't set sequence number in reply */
@@ -43,6 +44,7 @@ typedef struct xhiv_response {
uint16_t reqType; /* Request code, extension number or XHIV_REQ constant */
uint16_t reqMinor; /* Extension minor request code */
uint32_t sequence; /* Sequence number, or XHIV_SEQ_IGNORE */
+ const void *match_data; /* Additional data for matching requests */
uint32_t length; /* Total length of reply packet, in 4-byte words */
const void *response_data; /* Data to return */
uint32_t response_datalen; /* Length of response_data, in bytes */