1 / 7

Module 7 – External Data Representation

Module 7 – External Data Representation. Objectives. XDR 에 대한 정의 및 구조에 대해 이해 한다 . 표준 XDR 필터 루틴에 대해 이해한다 . 복잡한 XDR 필터 루틴에 대해 이해한다 . XDR 에서 동적 메모리 할당 방식에 대해 이해한다. XDR need. Local data format. Local data format. XDR Translate. Machine independent data format. XDR Translate.

Download Presentation

Module 7 – External Data Representation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module 7 – External Data Representation

  2. Objectives • XDR에 대한 정의 및 구조에 대해 이해 한다. • 표준 XDR 필터 루틴에 대해 이해한다. • 복잡한 XDR 필터 루틴에 대해 이해한다. • XDR에서 동적 메모리 할당 방식에 대해 이해한다.

  3. XDR need Local data format Local data format XDR Translate Machine independent data format XDR Translate Network Machine independent data format

  4. XDR architecture and Canonical standard • XDR’s data representation • Integer Data type : Big-endian • Floating-point : IEEE format, floating-point • String character : ASCII • All data type to be a multiple of 4 bytes in size • For alignment • Bytes used for padding set to 0 • Two little-endian machines • Transferring integers according to the XDR standard

  5. XDR Library • Solves data portability problems between different network system • XDR filter 루틴을 포함 • Local format을 XDR format으로 변환(Encoding) • XDR stream을 local format으로 변환(Decoding) • Basic data type, some compound data type을 제공 • Integer, float, String, structures, unions, arrays, pointer, … • XDR Stream • Standard I/o stream • Connects the XDR filter routines to an I/O channel with the functionality provided by the standard I/O library • xdrstdio_create(); • Memory stream • Connects the XDR filter routines to a buffer area of memory • xdrmem_create(); • RPC user는 XDR Stream을 생성 할 필요가 없다 • RPC 시스템은 자체적으로 XDR stream을 만들고 user에게 패스한다.

  6. C Type Filter XDR Type bool_t(actually C int) char short int unsigned short int int unsigned int long unsigned long float double void enum xdr_bool() xdr_char() xdr_short() xdr_u_short() xdr_int() xdr_u_int() xdr_long() xdr_u_long() xdr_float() xdr_double() xdr_void() xdr_enum() int int int unsigned int int unsigned int int unsigned int float double void int XDR primitive data type • Format bool_t xdr_type ( XDR * xdrs, /* XDR stream */ (true or false) type *xp); /* pointer to object to be converted */

  7. Composite Data Type Filter Variable-length array with arbitrary element size Variable-length array of bytes Fixed-length data Object references, including NULL pointers (for tree or linked-lists) Object refernces NULL-terminated character arrays Discriminated union Fixed-length array with arbitrary element size xdr_array() xdr_bytes() xdr_opaque() xdr_pointer() xdr_refernce() xdr_string() xdr_union() xdr_vector() XDR complex data type

More Related