RPC to Go v.1

? Blog ???? ??? TechNet ??? ??? RPC? ?? ??? ??? ???? ?????. RPC? ??? ??? ???? ??? ? ??? ??? ?? ??? ??? ????? ???????. ???? MSDN? ?????. https://msdn.microsoft.com

??? ?? ? ?? ?? ????? ?????.

  • Remote Procedure Call(????, RPC) – ???????? ?? ?? ??? ?? procedure? ??? ? ??? ??? process? ?? ?????. ?? machine???? ?? ?? machine???? ??? ? ????.
    •  Huh? : ?? ??, RPC? Outlook ?????? Exchange ??? ???? ????. ?? Outlook? Exchange ???? ???? ??? RPC? email? local?? ??? ? ????.
  • Run-time library – ?????? ?? Stub?? ????? ??? ?? ???????. ?? ??????? ?? ?? ??? ??? ????? ??? ??? address space? ??? ???.
  • Client Stub – ?????? ??? ???? ?? ??? Network Data Representation(NDR)? ?????. ??? run-time library? ?????.
  • Server Stub – incoming RPC ??? ???? ??????? ????? ??? ?????. ?? ?? ??????? ??? ??? run time library? ?????.
  • Transport – ??? ??? ?? RPC run-time?? ???? ???? ???
  • UUID – ? ??????? ??? Universally Unique Identifier
  • End Point Mapper – ?? ??????? ??? ??? IP address? ?? ????? EPM ???? UUID? ?????. ??? ??????? ??? EPM?? ????? ???.
    • Huh: EPM? ??????? ??? ??? ?? ? ??? ?????.
    • Note: ?? ????? ??????? ?? ??????? ???? ??? ??/IP address? ?? ???, ?????? endpoint mapper?? ??? ?? ?? ???.

RPC? ??? ?????

PRC Process

image

  • ????? ??????? ?? ????(??? ?? ?????? ????) ? ?????. ?????? ??? ????? Stub? ?????? address space?? ??? ????? ????. ?? ??? ?? ????? ?? ???? ????? ???(marsharlling)? ??? NDR(Network Data Representation)?? ?? ???. Stub? ?????? RPC run-time library?? ??? ?? ???. RPC Transfer Syntax? ???? ?? ??? procedure call? ????.
  • ??? RPC? transport ??????, ????? ?? data? ?? mechanism? ???? ???. RPC? UDP, TCP, HTTP, Named Pipes(?????)? ?????. data? ??? ??? ???? ?? random?? ???? ?? ??? ?????? ???? ?????? ??? ???? ????? ???? ???.
  • ?? ??????? ?? ??? IP address? ?? ??? ?? ??? ?????? RPC bind? ?? ???.
  • ?? IP? ?? ??? ??? ? ??? ?????? ?? ??? endpoint mapper? bing?? ???. ???? ?????? ??? endpoint mapper? ???? ?? ???? ????.
    • RPC application UUID
    • RPC Transfer Syntax (???? ?? ????)
      • Note: Microsoft? ??? transfer syntax? ????. ??? ??? ???? GUID?? [8A88]? ???? ?? 32 bit ??? NDR? ?? ?? ??? [7171]? ???? GUID? x64 ????? ?? NDR64? ???? ????.
    • RPC protocol identifier
  • ? ?? ??? ??? ??? ??? Tower? ?? ? ?? ????. 4?? EPM port???. 5?? EPM? listening?? IP? ??? ??? ??? ????.
    • Note: ?? ??? IP address? ??? tower? ????? ???. ?? Steve Light? ??? ?? ???.

image

  • ??? IP address? listening ??? ??? ?????? ??? RPC bind? ?????. RPC bind(bind_ack)? ???? ? ? NDR? run-time library? ?????. Run-time library ? ?? stub procedure? ???? ???. ?? stub? NDR? ?? ?? ??? ?? ??? ?? procedure? ???? ???.
  • ?? ??? ??????? procedure? ?? ???. procedure? data? ?? stub?? ?????.
  • ????? stub? ???? server stub? data? client stub? ?? ?? NDR? ?????.
  • ?? ??? RPC run-time library? data? ????? ?????.
  • ? ????? ??? ??? ?????? ?? ?????. run-time library? data? ????.
  • ????? stub? NDR? ???? ?? ?????? address space? ?????.
  • ????? ??????? ??? local?? ???? ??? ?? ???.
    • ??? Outlook ???? ???? ?? ???? ?? ???? ????.

????, RPC? address space?? procedure? ????? ?? ???. ?????? ?? ??????? ??? ??? ???? ??? ??? ?? ?? ????. ? ??? ??? ???? RPC? ?????? ????? ??? ???? ???. ??? network trace? ??? ???. OpNums? ??? ??? ??? ? ????.

Resources

RPC API https://www.opengroup.org/onlinepubs/9692999399/chap2.htm#tagcjh_05_02_08

RPC on MSDN https://msdn.microsoft.com/en-us/library/aa378651(VS.85).aspx

RPC on TechNet https://technet.microsoft.com/en-us/library/cc774438.aspx

- Rich Chambers