Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

dsrepl

import "github.com/TheManticoreProject/Manticore/windows/activedirectory/replication/dsrepl"

Package dsrepl implements the DS_REPL_*_BLOB structures defined in [MS-ADTS] section 2.2. These are the binary (";binary" qualified) LDAP representations of the replication state structures otherwise returned by the IDL_DRSGetReplInfo RPC method, as read from the rootDSE attributes msDS-ReplAllInboundNeighbors, msDS-ReplConnectionFailures, msDS-ReplLinkFailures, msDS-ReplPendingOps, msDS-ReplQueueStatistics, msDS-NCReplCursors, msDS-ReplAttributeMetaData, and msDS-ReplValueMetaData.

Each structure is a fixed-size header in which string fields are stored as 32-bit byte offsets (the osz* members), relative to the start of the structure, pointing into a trailing variable-length data region of packed, null-terminated UTF-16LE strings. All multibyte fields use little-endian byte ordering.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/a38fb14a-5f54-41ad-8875-c0c716afd53b

Index

Constants

DS_REPL_OP_TYPE values for the OpType field of DS_REPL_OPW_BLOB.

const (
    DS_REPL_OP_TYPE_SYNC        uint32 = 0
    DS_REPL_OP_TYPE_ADD         uint32 = 1
    DS_REPL_OP_TYPE_DELETE      uint32 = 2
    DS_REPL_OP_TYPE_MODIFY      uint32 = 3
    DS_REPL_OP_TYPE_UPDATE_REFS uint32 = 4
)

type DS\_REPL\_ATTR\_META\_DATA\_BLOB

DS_REPL_ATTR_META_DATA_BLOB is a representation of a stamp variable (of type AttributeStamp) of an attribute. This structure, retrieved using an LDAP search method, is an alternative representation of DS_REPL_ATTR_META_DATA_2, retrieved using the IDL_DRSGetReplInfo RPC method.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/63fabec7-cb4b-47ed-ab45-9a20e4397d55

type DS_REPL_ATTR_META_DATA_BLOB struct {
    // AttributeName is the LDAP display name of the attribute (oszAttributeName). nil if NULL.
    AttributeName *string
    // Version is the dwVersion of the attribute's AttributeStamp (dwVersion).
    Version uint32
    // LastOriginatingChange is the timeChanged of the AttributeStamp (ftimeLastOriginatingChange).
    LastOriginatingChange data_structures.FILETIME
    // LastOriginatingDsaInvocationID is the uuidOriginating of the AttributeStamp (uuidLastOriginatingDsaInvocationID).
    LastOriginatingDsaInvocationID guid.GUID
    // OriginatingChange is the usnOriginating of the AttributeStamp (usnOriginatingChange).
    OriginatingChange int64
    // LocalChange is the USN on the destination server of the last applied change (usnLocalChange).
    LocalChange int64
    // LastOriginatingDsaDN is the DN of the nTDSDSA object that originated the last replication (oszLastOriginatingDsaDN). nil if NULL.
    LastOriginatingDsaDN *string
}

func NewDS\_REPL\_ATTR\_META\_DATA\_BLOB

func NewDS_REPL_ATTR_META_DATA_BLOB() *DS_REPL_ATTR_META_DATA_BLOB

NewDS_REPL_ATTR_META_DATA_BLOB creates a new, empty DS_REPL_ATTR_META_DATA_BLOB structure.

func (*DS_REPL_ATTR_META_DATA_BLOB) Describe

func (b *DS_REPL_ATTR_META_DATA_BLOB) Describe(indent int)

Describe prints the DS_REPL_ATTR_META_DATA_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_ATTR_META_DATA_BLOB) Marshal

func (b *DS_REPL_ATTR_META_DATA_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_ATTR_META_DATA_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_ATTR_META_DATA_BLOB) String

func (b *DS_REPL_ATTR_META_DATA_BLOB) String() string

String returns a string representation of the DS_REPL_ATTR_META_DATA_BLOB structure.

func (*DS_REPL_ATTR_META_DATA_BLOB) Unmarshal

func (b *DS_REPL_ATTR_META_DATA_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_ATTR_META_DATA_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure (header followed by its data region).

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.

type DS\_REPL\_CURSOR\_BLOB

DS_REPL_CURSOR_BLOB is the packet representation of the ReplUpToDateVector type of an NC replica. This structure, retrieved using an LDAP search method, is an alternative representation of DS_REPL_CURSOR_3W, retrieved using the IDL_DRSGetReplInfo RPC method.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/42f0e26e-7627-4e68-814c-afc35a2b5f62

type DS_REPL_CURSOR_BLOB struct {
    // SourceDsaInvocationID is the invocationId of the originating server (uuidSourceDsaInvocationID).
    SourceDsaInvocationID guid.GUID
    // AttributeFilter is the maximum USN recorded for the originating server (usnAttributeFilter).
    AttributeFilter int64
    // LastSyncSuccess is the time of the last successful synchronization (fTimeLastSyncSuccess).
    LastSyncSuccess data_structures.FILETIME
    // SourceDsaDN is the DN of the DSA of the source server (oszSourceDsaDN). nil if NULL.
    SourceDsaDN *string
}

func NewDS\_REPL\_CURSOR\_BLOB

func NewDS_REPL_CURSOR_BLOB() *DS_REPL_CURSOR_BLOB

NewDS_REPL_CURSOR_BLOB creates a new, empty DS_REPL_CURSOR_BLOB structure.

func (*DS_REPL_CURSOR_BLOB) Describe

func (b *DS_REPL_CURSOR_BLOB) Describe(indent int)

Describe prints the DS_REPL_CURSOR_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_CURSOR_BLOB) Marshal

func (b *DS_REPL_CURSOR_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_CURSOR_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_CURSOR_BLOB) String

func (b *DS_REPL_CURSOR_BLOB) String() string

String returns a string representation of the DS_REPL_CURSOR_BLOB structure.

func (*DS_REPL_CURSOR_BLOB) Unmarshal

func (b *DS_REPL_CURSOR_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_CURSOR_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure (header followed by its data region).

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.

type DS\_REPL\_KCC\_DSA\_FAILUREW\_BLOB

DS_REPL_KCC_DSA_FAILUREW_BLOB is a representation of a tuple from the kCCFailedConnections or kCCFailedLinks variables of a DC. This structure, retrieved using an LDAP search method, is an alternative representation of DS_REPL_KCC_DSA_FAILUREW, retrieved using the IDL_DRSGetReplInfo RPC method.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/93083f06-d18a-407b-b906-630ed214a7ff

type DS_REPL_KCC_DSA_FAILUREW_BLOB struct {
    // DsaDN is the DN of the nTDSDSA object of the source server (oszDsaDN). nil if NULL.
    DsaDN *string
    // DsaObjGuid is the objectGUID of the object represented by DsaDN (uuidDsaObjGuid).
    DsaObjGuid guid.GUID
    // FirstFailure is the time the first failure occurred (ftimeFirstFailure).
    FirstFailure data_structures.FILETIME
    // NumFailures is the number of consecutive failures since the last success (cNumFailures).
    NumFailures uint32
    // LastResult is the error code associated with the most recent failure (dwLastResult).
    LastResult uint32
}

func NewDS\_REPL\_KCC\_DSA\_FAILUREW\_BLOB

func NewDS_REPL_KCC_DSA_FAILUREW_BLOB() *DS_REPL_KCC_DSA_FAILUREW_BLOB

NewDS_REPL_KCC_DSA_FAILUREW_BLOB creates a new, empty DS_REPL_KCC_DSA_FAILUREW_BLOB structure.

func (*DS_REPL_KCC_DSA_FAILUREW_BLOB) Describe

func (b *DS_REPL_KCC_DSA_FAILUREW_BLOB) Describe(indent int)

Describe prints the DS_REPL_KCC_DSA_FAILUREW_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_KCC_DSA_FAILUREW_BLOB) Marshal

func (b *DS_REPL_KCC_DSA_FAILUREW_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_KCC_DSA_FAILUREW_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_KCC_DSA_FAILUREW_BLOB) String

func (b *DS_REPL_KCC_DSA_FAILUREW_BLOB) String() string

String returns a string representation of the DS_REPL_KCC_DSA_FAILUREW_BLOB structure.

func (*DS_REPL_KCC_DSA_FAILUREW_BLOB) Unmarshal

func (b *DS_REPL_KCC_DSA_FAILUREW_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_KCC_DSA_FAILUREW_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure (header followed by its data region).

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.

type DS\_REPL\_NEIGHBORW\_BLOB

DS_REPL_NEIGHBORW_BLOB is a representation of a tuple from the repsFrom or repsTo abstract attribute of an NC replica. This structure, retrieved using an LDAP search method, is an alternative representation of DS_REPL_NEIGHBORW, retrieved using the IDL_DRSGetReplInfo RPC method.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/58877402-4bf1-4b40-b405-fd9d11691752

type DS_REPL_NEIGHBORW_BLOB struct {
    // NamingContext is the NC to which this replication state data pertains (oszNamingContext). nil if NULL.
    NamingContext *string
    // SourceDsaDN is the DN of the nTDSDSA object of the source server (oszSourceDsaDN). nil if NULL.
    SourceDsaDN *string
    // SourceDsaAddress is the transport-specific network address of the source server (oszSourceDsaAddress). nil if NULL.
    SourceDsaAddress *string
    // AsyncIntersiteTransportDN is the DN of the interSiteTransport object, or nil for RPC/IP (oszAsyncIntersiteTransportDN).
    AsyncIntersiteTransportDN *string
    // ReplicaFlags is a set of DS_REPL_NBR_* flags (dwReplicaFlags).
    ReplicaFlags uint32
    // Reserved is reserved for future use (dwReserved).
    Reserved uint32
    // NamingContextObjGuid is the objectGUID of the NC (uuidNamingContextObjGuid).
    NamingContextObjGuid guid.GUID
    // SourceDsaObjGuid is the objectGUID of the source nTDSDSA object (uuidSourceDsaObjGuid).
    SourceDsaObjGuid guid.GUID
    // SourceDsaInvocationID is the invocationId used by the source server (uuidSourceDsaInvocationID).
    SourceDsaInvocationID guid.GUID
    // AsyncIntersiteTransportObjGuid is the objectGUID of the intersite transport object (uuidAsyncIntersiteTransportObjGuid).
    AsyncIntersiteTransportObjGuid guid.GUID
    // LastObjChangeSynced is the USN of the last object update received (usnLastObjChangeSynced).
    LastObjChangeSynced int64
    // AttributeFilter is the LastObjChangeSynced value at the end of the last complete cycle (usnAttributeFilter).
    AttributeFilter int64
    // LastSyncSuccess is the time the last successful replication cycle completed (ftimeLastSyncSuccess).
    LastSyncSuccess data_structures.FILETIME
    // LastSyncAttempt is the time of the last replication attempt (ftimeLastSyncAttempt).
    LastSyncAttempt data_structures.FILETIME
    // LastSyncResult is the Windows error code of the last replication attempt (dwLastSyncResult).
    LastSyncResult uint32
    // NumConsecutiveSyncFailures is the number of failed replication attempts since the last success (cNumConsecutiveSyncFailures).
    NumConsecutiveSyncFailures uint32
}

func NewDS\_REPL\_NEIGHBORW\_BLOB

func NewDS_REPL_NEIGHBORW_BLOB() *DS_REPL_NEIGHBORW_BLOB

NewDS_REPL_NEIGHBORW_BLOB creates a new, empty DS_REPL_NEIGHBORW_BLOB structure.

func (*DS_REPL_NEIGHBORW_BLOB) Describe

func (b *DS_REPL_NEIGHBORW_BLOB) Describe(indent int)

Describe prints the DS_REPL_NEIGHBORW_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_NEIGHBORW_BLOB) Marshal

func (b *DS_REPL_NEIGHBORW_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_NEIGHBORW_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_NEIGHBORW_BLOB) String

func (b *DS_REPL_NEIGHBORW_BLOB) String() string

String returns a string representation of the DS_REPL_NEIGHBORW_BLOB structure.

func (*DS_REPL_NEIGHBORW_BLOB) Unmarshal

func (b *DS_REPL_NEIGHBORW_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_NEIGHBORW_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure (header followed by its data region).

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.

type DS\_REPL\_OPW\_BLOB

DS_REPL_OPW_BLOB is a representation of a tuple from the replicationQueue variable of a DC. This structure, retrieved using an LDAP search method, is an alternative representation of DS_REPL_OPW, retrieved using the IDL_DRSGetReplInfo RPC method.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/9bdde2d1-1f61-4829-bf73-3a45f85302a3

type DS_REPL_OPW_BLOB struct {
    // Enqueued is the time this operation was added to the queue (ftimeEnqueued).
    Enqueued data_structures.FILETIME
    // SerialNumber is the identifier of the operation (ulSerialNumber).
    SerialNumber uint32
    // Priority is the priority value of this operation (ulPriority).
    Priority uint32
    // OpType is the type of operation, one of the DS_REPL_OP_TYPE_* values (opType).
    OpType uint32
    // Options is zero or more DRS option bits, interpreted per OpType (ulOptions).
    Options uint32
    // NamingContext is the DN of the NC associated with this operation (oszNamingContext). nil if NULL.
    NamingContext *string
    // DsaDN is the DN of the nTDSDSA object of the remote server (oszDsaDN). nil if NULL.
    DsaDN *string
    // DsaAddress is the transport-specific network address of the remote server (oszDsaAddress). nil if NULL.
    DsaAddress *string
    // NamingContextObjGuid is the objectGUID of the NC identified by NamingContext (uuidNamingContextObjGuid).
    NamingContextObjGuid guid.GUID
    // DsaObjGuid is the objectGUID of the DSA object identified by DsaDN (uuidDsaObjGuid).
    DsaObjGuid guid.GUID
}

func NewDS\_REPL\_OPW\_BLOB

func NewDS_REPL_OPW_BLOB() *DS_REPL_OPW_BLOB

NewDS_REPL_OPW_BLOB creates a new, empty DS_REPL_OPW_BLOB structure.

func (*DS_REPL_OPW_BLOB) Describe

func (b *DS_REPL_OPW_BLOB) Describe(indent int)

Describe prints the DS_REPL_OPW_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_OPW_BLOB) Marshal

func (b *DS_REPL_OPW_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_OPW_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_OPW_BLOB) String

func (b *DS_REPL_OPW_BLOB) String() string

String returns a string representation of the DS_REPL_OPW_BLOB structure.

func (*DS_REPL_OPW_BLOB) Unmarshal

func (b *DS_REPL_OPW_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_OPW_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure (header followed by its data region).

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.

type DS\_REPL\_QUEUE\_STATISTICSW\_BLOB

DS_REPL_QUEUE_STATISTICSW_BLOB contains the statistics related to the replicationQueue variable of a DC, returned by reading the msDS-ReplQueueStatistics rootDSE attribute.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/aa5923c9-48bf-4182-93ff-6353dd9f0b00

type DS_REPL_QUEUE_STATISTICSW_BLOB struct {
    // CurrentOpStarted is the time the currently running operation started (ftimeCurrentOpStarted).
    CurrentOpStarted data_structures.FILETIME
    // NumPendingOps is the number of currently pending operations (cNumPendingOps).
    NumPendingOps uint32
    // OldestSync is the time of the oldest synchronization operation (ftimeOldestSync).
    OldestSync data_structures.FILETIME
    // OldestAdd is the time of the oldest add operation (ftimeOldestAdd).
    OldestAdd data_structures.FILETIME
    // OldestMod is the time of the oldest modification operation (ftimeOldestMod).
    OldestMod data_structures.FILETIME
    // OldestDel is the time of the oldest delete operation (ftimeOldestDel).
    OldestDel data_structures.FILETIME
    // OldestUpdRefs is the time of the oldest reference update operation (ftimeOldestUpdRefs).
    OldestUpdRefs data_structures.FILETIME
}

func NewDS\_REPL\_QUEUE\_STATISTICSW\_BLOB

func NewDS_REPL_QUEUE_STATISTICSW_BLOB() *DS_REPL_QUEUE_STATISTICSW_BLOB

NewDS_REPL_QUEUE_STATISTICSW_BLOB creates a new, empty DS_REPL_QUEUE_STATISTICSW_BLOB structure.

func (*DS_REPL_QUEUE_STATISTICSW_BLOB) Describe

func (b *DS_REPL_QUEUE_STATISTICSW_BLOB) Describe(indent int)

Describe prints the DS_REPL_QUEUE_STATISTICSW_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_QUEUE_STATISTICSW_BLOB) Marshal

func (b *DS_REPL_QUEUE_STATISTICSW_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_QUEUE_STATISTICSW_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_QUEUE_STATISTICSW_BLOB) String

func (b *DS_REPL_QUEUE_STATISTICSW_BLOB) String() string

String returns a string representation of the DS_REPL_QUEUE_STATISTICSW_BLOB structure.

func (*DS_REPL_QUEUE_STATISTICSW_BLOB) Unmarshal

func (b *DS_REPL_QUEUE_STATISTICSW_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_QUEUE_STATISTICSW_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure.

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.

type DS\_REPL\_VALUE\_META\_DATA\_BLOB

DS_REPL_VALUE_META_DATA_BLOB is a representation of a stamp variable (of type LinkValueStamp) of a link value. This structure, retrieved using an LDAP search method, is an alternative representation of DS_REPL_VALUE_META_DATA_2, retrieved using the IDL_DRSGetReplInfo RPC method.

Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/5d421689-808b-466d-8d9f-106cda2dbcce

type DS_REPL_VALUE_META_DATA_BLOB struct {
    // AttributeName is the LDAP display name of the attribute (oszAttributeName). nil if NULL.
    AttributeName *string
    // ObjectDn is the DN of the object that this attribute belongs to (oszObjectDn). nil if NULL.
    ObjectDn *string
    // Data is the attribute replication metadata buffer (cbData / pbData).
    Data []byte
    // Deleted is the timeDeleted of the LinkValueStamp (ftimeDeleted).
    Deleted data_structures.FILETIME
    // Created is the timeCreated of the LinkValueStamp (ftimeCreated).
    Created data_structures.FILETIME
    // Version is the dwVersion of the LinkValueStamp (dwVersion).
    Version uint32
    // LastOriginatingChange is the timeChanged of the LinkValueStamp (ftimeLastOriginatingChange).
    LastOriginatingChange data_structures.FILETIME
    // LastOriginatingDsaInvocationID is the uuidOriginating of the LinkValueStamp (uuidLastOriginatingDsaInvocationID).
    LastOriginatingDsaInvocationID guid.GUID
    // OriginatingChange is the usnOriginating of the LinkValueStamp (usnOriginatingChange).
    OriginatingChange int64
    // LocalChange is the USN on the destination server of the last applied change (usnLocalChange).
    LocalChange int64
    // LastOriginatingDsaDN is the DN of the nTDSDSA object that originated the last replication (oszLastOriginatingDsaDN). nil if NULL.
    LastOriginatingDsaDN *string
}

func NewDS\_REPL\_VALUE\_META\_DATA\_BLOB

func NewDS_REPL_VALUE_META_DATA_BLOB() *DS_REPL_VALUE_META_DATA_BLOB

NewDS_REPL_VALUE_META_DATA_BLOB creates a new, empty DS_REPL_VALUE_META_DATA_BLOB structure.

func (*DS_REPL_VALUE_META_DATA_BLOB) Describe

func (b *DS_REPL_VALUE_META_DATA_BLOB) Describe(indent int)

Describe prints the DS_REPL_VALUE_META_DATA_BLOB structure to the console.

Parameters: - indent: The number of levels to indent the output.

func (*DS_REPL_VALUE_META_DATA_BLOB) Marshal

func (b *DS_REPL_VALUE_META_DATA_BLOB) Marshal() ([]byte, error)

Marshal serializes the DS_REPL_VALUE_META_DATA_BLOB structure into a byte slice.

Returns: - A byte slice containing the marshalled structure. - An error if the marshalling fails.

func (*DS_REPL_VALUE_META_DATA_BLOB) String

func (b *DS_REPL_VALUE_META_DATA_BLOB) String() string

String returns a string representation of the DS_REPL_VALUE_META_DATA_BLOB structure.

func (*DS_REPL_VALUE_META_DATA_BLOB) Unmarshal

func (b *DS_REPL_VALUE_META_DATA_BLOB) Unmarshal(data []byte) (int, error)

Unmarshal parses a DS_REPL_VALUE_META_DATA_BLOB structure from a byte slice.

Parameters: - data: A byte slice containing the structure (header followed by its data region).

Returns: - The number of bytes consumed. - An error if the unmarshalling fails.