### ms-bpau.idl
"""
RPC definitions for the following interfaces:
- BitsPeerAuth (v1.0): e3d0d746-d2af-40fd-8a7a-0d7078bb7092
This file is auto-generated by midl-to-scapy, do not modify.
"""

import uuid


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


class ExchangePublicKeys_Request(NDRPacket):
    fields_desc = [
        NDRIntField("ClientKeyLength", None, size_of="ClientKey"),
        NDRConfStrLenField("ClientKey", "", size_is=lambda pkt: pkt.ClientKeyLength),
    ]


class ExchangePublicKeys_Response(NDRPacket):
    fields_desc = [
        NDRIntField("pServerKeyLength", None, size_of="pServerKey"),
        NDRConfStrLenField("pServerKey", "", size_is=lambda pkt: pkt.pServerKeyLength),
        NDRIntField("status", 0),
    ]


BITSPEERAUTH_OPNUMS = {
    0: DceRpcOp(ExchangePublicKeys_Request, ExchangePublicKeys_Response)
}
register_dcerpc_interface(
    name="BitsPeerAuth",
    uuid=uuid.UUID("e3d0d746-d2af-40fd-8a7a-0d7078bb7092"),
    version="1.0",
    opnums=BITSPEERAUTH_OPNUMS,
)
