Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

The whole site in one document for easy reference!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  Network File and Resource Sharing Protocols and the TCP/IP Network File System (NFS)
           9  TCP/IP Network File System (NFS)

Previous Topic/Section
NFS Architecture and Components
Previous Page
Pages in Current Topic/Section
1
2
Next Page
NFS Client/Server Operation Using Remote Procedure Calls (RPCs)
Next Topic/Section

NFS Data Storage and Data Types, and the External Data Representation (XDR) Standard
(Page 2 of 2)

XDR Data Types

For XDR to be universal, it must allow the description of all the common types of data that are used in computers. For example, it must allow integers, floating point numbers, strings and other data constructs to be exchanged. The XDR standard describes the structure of many data types using a notation somewhat similar to the language “C”. As you may know, this is one of the most popular languages in computing history, and is closely associated with UNIX and, as a result, certain TCP/IP technologies as well.

Table 181 shows the data types defined by XDR, which can be used by NFS in exchanging data between client and server. For each I have included the data type code, its size in bytes, and a name and a brief description.


Table 181: NFS External Data Representation (XDR) Data Types

Data Type Code

Size (bytes)

Description

int

4

Signed Integer: A 32-bit signed integer in two's complement notation, capable of holding a value from -2,147,483,648 to +2,147,483,647.

unsigned int

4

Unsigned Integer: A 32-bit unsigned integer, from 0 to 4,294,967,295.

enum

4

Enumeration: An alternate way of expressing a signed integer where some of the integer values are used to stand for particular constant values. For example, you could represent the colors of the rainbow, by defining the value 1 to stand for “PURPLE”, 2 to stand for “BLUE” and so on.

bool

4

Boolean: A logical representation of an integer, analogous to a two-level enumeration where a value of 0 is defined as “FALSE” and 1 is “TRUE”.

hyper

8

Signed Hyper Integer: Same as a regular signed integer, but 8 bytes wide to allow much larger numbers.

unsigned hyper

8

Unsigned Hyper Integer: Same as a regular unsigned integer but 8 bytes wide to allow much larger numbers.

float

4

Floating-Point Number: A 32-bit signed floating-point number. 1 bit holds the sign (positive or negative), 8 bits hold the exponent (power), in base 2, and 23 bits hold the mantissa (fractional part of the number).

double

8

Double-Precision Floating-Point Number: The same as float but with more bits to allow greater precision. 1 bit is for the sign, 11 bits for the exponent and 52 bits for the mantissa.

quadruple

16

Quadruple-Precision Floating-Point Number: The same as float and double but with still more bits to allow greater precision. 1 bit is for the sign, 15 bits for the exponent and 112 bits for the mantissa.

opaque

Variable

Opaque Data: Data that is to be passed between devices without being given a specific representation using XDR. The term opaque means that the data is treated like a “black box” whose insides cannot be seen. Obviously, any machines using this data type must themselves know how to deal with it, since NFS does not.

string

Variable

String: A variable-length string of ASCII characters.

(array)

Variable

Arrays: A group of any single type of the elements above, such as integers, floating point numbers and so on, may be specified in an array to allow many to be referenced as a single unit. They are not indicated using a separate data type code.

struct

Variable

Structure: An arbitrary structure containing other data elements from this table. This allows the definition of complex data types.

union

Variable

Discriminated Union: A complex form of structure that I cannot do justice to with a short description here. J

void

0

Void: A “null” data type that contains nothing.

const

0

Constant: Doesn't declare data, just defines a constant value used in other representations.


As you can see, XDR provides considerable data description capability. If you know the “C” language, much of what is in that table is probably familiar to you. Unfortunately, I can't really describe many of the more complex data types in the table above in detail without turning this into a guide to C programming.

In addition to the above, XDR also provides a means of defining new data types, and a method for specifying optional data. This provides even more flexibility beyond the large number of specific types already specifically described. Each version of NFS has a slightly different list of data types it supports.


Previous Topic/Section
NFS Architecture and Components
Previous Page
Pages in Current Topic/Section
1
2
Next Page
NFS Client/Server Operation Using Remote Procedure Calls (RPCs)
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.