datapath-windows: Reduce padding size in _OVS_PACKET_HDR_INFO.
[cascardo/ovs.git] / datapath-windows / ovsext / Event.h
1 /*
2  * Copyright (c) 2014 VMware, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __EVENT_H_
18 #define __EVENT_H_ 1
19
20 typedef struct _OVS_EVENT_QUEUE_ELEM {
21     LIST_ENTRY link;
22     OVS_EVENT_ENTRY event;
23 } OVS_EVENT_QUEUE_ELEM, *POVS_EVENT_QUEUE_ELEM;
24
25 typedef struct _OVS_EVENT_QUEUE {
26     LIST_ENTRY queueLink;
27     LIST_ENTRY elemList;
28     UINT32 mask;
29     UINT16 numElems;
30     BOOLEAN pollAll;
31     PIRP pendingIrp;
32     PVOID instance;
33 } OVS_EVENT_QUEUE, *POVS_EVENT_QUEUE;
34
35 NTSTATUS OvsInitEventQueue(VOID);
36 VOID OvsCleanupEventQueue(VOID);
37
38 struct _OVS_OPEN_INSTANCE;
39
40 VOID OvsCleanupEvent(struct _OVS_OPEN_INSTANCE *instance);
41 VOID OvsPostEvent(POVS_EVENT_ENTRY event);
42 NTSTATUS OvsSubscribeEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer,
43                                 UINT32 inputLength);
44 NTSTATUS OvsPollEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer,
45                            UINT32 inputLength, PVOID outputBuffer,
46                            UINT32 outputLength, UINT32 *replyLen);
47 NTSTATUS OvsWaitEventIoctl(PIRP irp, PFILE_OBJECT fileObject,
48                            PVOID inputBuffer, UINT32 inputLength);
49 NTSTATUS OvsRemoveEventEntry(PVOID instance, POVS_EVENT_ENTRY entry);
50
51 #endif /* __EVENT_H_ */