### ms-iiss.idl
"""
RPC definitions for the following interfaces:
- IIisServiceControl (v0.0): E8FB8620-588F-11D2-9D61-00C04F79C5FE
This file is auto-generated by midl-to-scapy, do not modify.
"""

import uuid


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


class Stop_Request(NDRPacket):
    fields_desc = []


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


class Start_Request(NDRPacket):
    fields_desc = []


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


class Reboot_Request(NDRPacket):
    fields_desc = []


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


class Status_Request(NDRPacket):
    fields_desc = [NDRIntField("dwBufferSize", 0)]


class Status_Response(NDRPacket):
    fields_desc = [
        NDRConfStrLenField("pbBuffer", "", size_is=lambda pkt: pkt.dwBufferSize),
        NDRIntField("pdwMDRequiredBufferSize", 0),
        NDRIntField("pdwNumServices", 0),
        NDRIntField("status", 0),
    ]


class Kill_Request(NDRPacket):
    fields_desc = []


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


IIISSERVICECONTROL_OPNUMS = {
    0: DceRpcOp(Stop_Request, Stop_Response),
    1: DceRpcOp(Start_Request, Start_Response),
    2: DceRpcOp(Reboot_Request, Reboot_Response),
    3: DceRpcOp(Status_Request, Status_Response),
    4: DceRpcOp(Kill_Request, Kill_Response),
}
register_com_interface(
    name="IIisServiceControl",
    uuid=uuid.UUID("E8FB8620-588F-11D2-9D61-00C04F79C5FE"),
    opnums=IIISSERVICECONTROL_OPNUMS,
)
