datapath-windows: Removed hardcoded names for internal/external vports
[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     UINT32 portNo;
23     UINT32 status;
24 } OVS_EVENT_QUEUE_ELEM, *POVS_EVENT_QUEUE_ELEM;
25
26 typedef struct _OVS_EVENT_QUEUE {
27     LIST_ENTRY queueLink;
28     LIST_ENTRY elemList;
29     UINT32 mask;
30     UINT16 numElems;
31     BOOLEAN pollAll;
32     PIRP pendingIrp;
33     PVOID instance;
34 } OVS_EVENT_QUEUE, *POVS_EVENT_QUEUE;
35
36 NTSTATUS OvsInitEventQueue(VOID);
37 VOID OvsCleanupEventQueue(VOID);
38
39 struct _OVS_OPEN_INSTANCE;
40
41 VOID OvsCleanupEvent(struct _OVS_OPEN_INSTANCE *instance);
42 VOID OvsPostEvent(UINT32 portNo, UINT32 status);
43 NTSTATUS OvsSubscribeEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer,
44                                 UINT32 inputLength);
45 NTSTATUS OvsPollEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer,
46                            UINT32 inputLength, PVOID outputBuffer,
47                            UINT32 outputLength, UINT32 *replyLen);
48 NTSTATUS OvsWaitEventIoctl(PIRP irp, PFILE_OBJECT fileObject,
49                            PVOID inputBuffer, UINT32 inputLength);
50 NTSTATUS OvsRemoveEventEntry(PVOID instance, POVS_EVENT_ENTRY entry);
51
52 #endif /* __EVENT_H_ */