Electrical computers and digital processing systems: multicomput – Computer-to-computer data modifying
Reexamination Certificate
1998-06-30
2001-09-25
Luu, Le Hien (Department: 2152)
Electrical computers and digital processing systems: multicomput
Computer-to-computer data modifying
C717S152000
Reexamination Certificate
active
06295561
ABSTRACT:
BACKGROUND OF THE INVENTION
1. Technical Field of the Invention
This invention pertains to communications across networks between computers of different architectures. In particular, this invention provides templates enabling cross platform communication of complex structure-based messages across networks.
2. Background Art
Heretofore, dissimilar systems must communicate over networks using mutually agreed-upon message formats which do not take any system-specific characteristics such as word size or byte order into account. Two aspects of the problem which cause difficulty in such network communications are (1) structure packing, and (2) byte ordering.
Structure packing is a problem because not all compilers support #pragma pack(1). #pragma is an instruction to a compiler which the compiler may ignore, it is merely a suggestion. The “pack(1)” argument suggests to the compiler that it compress all data structures so no empty space exists, and the “(1)” refers one byte boundaries. A 32 bit computer generally aligns data on four byte boundaries. However, the “pack(1)” instruction will, if accepted by the computer, cause, for example, a 32 bit computer to behave like an 8 bit (that is, 1 byte) computer. No Macintosh compiler supports this option, for instance, and many UNIX and AIX compilers also lack this feature. The lack of such an option means that a programmer can not easily control the sizes of multi-part message structures due to differences in the native word size and word alignment rules on particular CPU architectures.
Byte ordering is a problem because different CPU architectures store multi-byte values in different physical memory orders. For instance, Intel-family CPUs store integers in the opposite byte order from PowerPC CPUs. This means that messages containing multi-byte components are difficult to handle in a portable fashion. C code source can be portable, but it is not automatically assured to be portable between computer platforms. C code source can be considered portable only if features that break portability are not used. For example, portability is broken by use of different integer lengths, such as 16 vs 32. The C language allows portability, but portability is easy to break. (In contrast, the ADA language guarantees portability.)
In the past, programmers dealt with problem (1) structure packing by declaring all structures used in inter-machine communication as simple arrays of bytes, then programming intricate and ugly ‘byte-stuffing’ logic to pack and unpack the arrays for communication. They dealt with problem (2) byte ordering by using macros or functions which pushed the CPU-architecture-dependent logic into header files or libraries which were still system-dependent (non-portable). While these techniques worked, they resulted in source code which was cryptic and very difficult to maintain.
Consequently, there is a need in the art for a system and method which enables the writing of portable communications software in, for example, C or C++ which will work property in a wide variety of target environments with only a mechanical recompile of the common source code.
It is an object of the invention to provide an improved system and method for structure packing and byte ordering.
It is a further object of the invention to provide an improved system and method for writing portable communications software that will work properly in a wide variety of target environments.
It is a further object of the invention to provide an improved system and method for translating between native data structures on arbitrary machines and specific message structures on communication media.
It is a further object of the invention to provide an improved system and method for translating data structures such that the byte order and word alignment on a native machine is translated as needed into the byte order and word alignment required in a communication media.
SUMMARY OF THE INVENTION
In accordance with the invention, a system and method is provided for translating between native data structures on arbitrary machines and specific message structures on communication media such that the byte order and word alignment on the native machine is translated as needed into the byte order and word alignment required in the communication media. In so doing, templates which represent data structures on the communication media and data structures in the host machine that represent the communication structures are defined. Then, translations adjusting for byte alignment (structure packing) and adjusting for byte order between these two representations are performed in either direction.
Other features and advantages of this invention will become apparent from the following detailed description of the presently preferred embodiment of the invention, taken in conjunction with the accompanying drawings.
REFERENCES:
patent: 5339434 (1994-08-01), Rusis
patent: 5708828 (1998-01-01), Coleman
patent: 5819117 (1998-10-01), Hansen
patent: 5828853 (1998-10-01), Regal
patent: 5909552 (1999-06-01), Jensen et al.
patent: 5909570 (1999-06-01), Webber
patent: 5924126 (1999-07-01), Rosenthal et al.
patent: 5968164 (1999-10-01), Loen et al.
patent: 6016555 (2000-01-01), Deao et al.
patent: 6021275 (2000-02-01), Horwat
patent: 6055619 (2000-04-01), North et al.
patent: 6091733 (2000-07-01), Takagi et al.
patent: 6141792 (2000-10-01), Acker et al.
patent: 6151608 (2000-11-01), Abrams
AT&T Corp
Jaroenchonwanit Bunjob
Luu Le Hien
LandOfFree
System for translating native data structures and specific... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with System for translating native data structures and specific..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System for translating native data structures and specific... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2500335