### mc-ccfg.idl
"""
RPC definitions for the following interfaces:
- IClusCfgAsyncEvictCleanup (v0.0): 52C80B95-C1AD-4240-8D89-72E9FA84025E
This file is auto-generated by midl-to-scapy, do not modify.
"""

import uuid


from scapy.layers.dcerpc import (
    NDRPacket,
    DceRpcOp,
    NDRConfStrLenField,
    NDRConfStrLenFieldUtf16,
    NDRIntField,
    NDRPacketField,
    NDRSignedIntField,
    register_com_interface,
)


class FLAGGED_WORD_BLOB(NDRPacket):
    ALIGNMENT = (4, 8)
    DEPORTED_CONFORMANTS = ["asData"]
    fields_desc = [
        NDRIntField("cBytes", 0),
        NDRIntField("clSize", None, size_of="asData"),
        NDRConfStrLenFieldUtf16(
            "asData", "", size_is=lambda pkt: pkt.clSize, conformant_in_struct=True
        ),
    ]


class CleanupNode_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("bstrEvictedNodeNameIn", FLAGGED_WORD_BLOB(), FLAGGED_WORD_BLOB),
        NDRSignedIntField("nDelayIn", 0),
        NDRSignedIntField("nTimeoutIn", 0),
    ]


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


ICLUSCFGASYNCEVICTCLEANUP_OPNUMS = {
    0: DceRpcOp(CleanupNode_Request, CleanupNode_Response)
}
register_com_interface(
    name="IClusCfgAsyncEvictCleanup",
    uuid=uuid.UUID("52C80B95-C1AD-4240-8D89-72E9FA84025E"),
    opnums=ICLUSCFGASYNCEVICTCLEANUP_OPNUMS,
)
