rpc

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2018 License: Apache-2.0

README

RPC

GoDoc Go Report Card Build Status

This project relates to CDE 1.1: Remote Procedure Call

It is a partial implementation that mainly focuses on unmarshaling NDR encoded byte streams into Go structures.

Help Wanted

Reference test vectors needed: It has been difficult to implement due to a lack of reference test byte streams in the standards documentation. Test driven development has been extremely challenging without these. If you are aware of and reference test vector sources for NDR encoding please let me know by raising an issue with the details. Thanks!

References

NDR Decode Capability Checklist

  • Format label
  • Boolean
  • Character
  • Unsigned small integer
  • Unsigned short integer
  • Unsigned long integer
  • Unsigned hyper integer
  • Signed small integer
  • Signed short integer
  • Signed long integer
  • Signed hyper integer
  • Single float
  • Double float
  • Uni-dimensional fixed array
  • Multi-dimensional fixed array
  • Uni-dimensional conformant array
  • Multi-dimensional conformant array
  • Uni-dimensional conformant varying array
  • Multi-dimensional conformant varying array
  • Varying string
  • Conformant varying string
  • Array of strings
  • Union
  • Pipe

Structs from IDL

Interface Definition Language (IDL)

Is a field a pointer?
Is an array conformant and/or varying?

An array is conformant if the IDL definition includes one of the following attributes:

  • min_is
  • max_is
  • size_is

An array is varying if the IDL definition includes one of the following attributes:

  • last_is
  • first_is
  • length_is
Examples:

SubAuthority[] is conformant in the example below:

 typedef struct _RPC_SID {
   unsigned char Revision;
   unsigned char SubAuthorityCount;
   RPC_SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
   [size_is(SubAuthorityCount)] unsigned long SubAuthority[];
 } RPC_SID,
  *PRPC_SID,
  *PSID;

Buffer is a pointer to a conformant varying array in the example below:

 typedef struct _RPC_UNICODE_STRING {
   unsigned short Length;
   unsigned short MaximumLength;
   [size_is(MaximumLength/2), length_is(Length/2)] 
     WCHAR* Buffer;
 } RPC_UNICODE_STRING,
  *PRPC_UNICODE_STRING;
Is a union encapsulated?

Directories

Path Synopsis
Package examples provides example decoding of NDR byte streams
Package examples provides example decoding of NDR byte streams
Package mstypes implements representations of Microsoft types
Package mstypes implements representations of Microsoft types
Package ndr provides the ability to unmarshal NDR encoded byte steams into Go data structures
Package ndr provides the ability to unmarshal NDR encoded byte steams into Go data structures

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL