### ms-raiw_winsif2.idl
"""
RPC definitions for the following interfaces:
- winsi2 (v1.0): 811109bf-a4e1-11d1-ab54-00a0c91e9b45
This file is auto-generated by midl-to-scapy, do not modify.
"""

import uuid


from scapy.layers.dcerpc import (
    NDRPacket,
    DceRpcOp,
    NDRByteField,
    NDRIntField,
    NDRLongField,
    NDRPacketField,
    NDRSignedLongField,
    register_dcerpc_interface,
)


class PWINSINTF_ADD_T(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [
        NDRByteField("Type", 0),
        NDRIntField("Len", 0),
        NDRIntField("IPAdd", 0),
    ]


class LARGE_INTEGER(NDRPacket):
    ALIGNMENT = (8, 8)
    fields_desc = [NDRSignedLongField("QuadPart", 0)]


class R_WinsTombstoneDbRecs_Request(NDRPacket):
    fields_desc = [
        NDRLongField("ServerHdl", 0),
        NDRPacketField("pWinsAdd", PWINSINTF_ADD_T(), PWINSINTF_ADD_T),
        NDRPacketField("MinVersNo", LARGE_INTEGER(), LARGE_INTEGER),
        NDRPacketField("MaxVersNo", LARGE_INTEGER(), LARGE_INTEGER),
    ]


class R_WinsTombstoneDbRecs_Response(NDRPacket):
    fields_desc = [NDRIntField("status", 0)]


class R_WinsCheckAccess_Request(NDRPacket):
    fields_desc = [NDRLongField("ServerHdl", 0)]


class R_WinsCheckAccess_Response(NDRPacket):
    fields_desc = [NDRIntField("Access", 0), NDRIntField("status", 0)]


WINSI2_OPNUMS = {
    0: DceRpcOp(R_WinsTombstoneDbRecs_Request, R_WinsTombstoneDbRecs_Response),
    1: DceRpcOp(R_WinsCheckAccess_Request, R_WinsCheckAccess_Response),
}
register_dcerpc_interface(
    name="winsi2",
    uuid=uuid.UUID("811109bf-a4e1-11d1-ab54-00a0c91e9b45"),
    version="1.0",
    opnums=WINSI2_OPNUMS,
)
