Giter VIP home page Giter VIP logo

c-lib-for-data-serialization's Introduction

Synopsis

The project is designed to provide capabilities to achieve RPC data serialization and deserialization on typical UNIX system calls, such as open, close, read, write, lseek, unlink, stat, getdirentries, as well as two self-defined functions, which are getdirtree and freedirtree.

An RPC protocol is designed to marshall and unmarshall data structures to achieve data serialization and deserialization so that RPC is transparent to client.

Code Example

The tcp-sample directory has a sample code for a simple server and client.

The interpose directory has code for creating a interposition library.

Network is done by sockets programming to log the operations to the remote server. Each time the server gets a socket connection from client, a new process will be forked.

Installation

Run "make" in Interpose directory to build the programs.

Tests

The tools directory has a few programs to test the code. These are binary-only tools that operate on the local filesystem. You will make them operate across the network by interposing on their C library calls. Run any of these tools without arguments for a brief message on how to use it. These binaries should work on x86 64-bit Linux systems (e.g., unix.andrew.cmu.edu servers).

To use the interposing library, try (if using BASH shell):

LD_PRELOAD=./interpose/mylib.so ./tools/440read README

or (if using CSH, TCSH, ...):

env LD_PRELOAD=./interpose/mylib.so ./tools/440read README

You should see a message indicating the open function in the interpositon library was called.

Note that the 440tree tool uses the getdirtree function implemented in libdirtree.so in the lib directory. Please add the absolute path of this directory to LD_LIBRARY_PATH to make sure that the system can find the library, e.g. on BASH:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$PWD/lib"

or if using CSH, TCSH, ...:

setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH;$PWD/lib"

Contributors

Thanks to CMU 15440 staff with sample start code.

Most of the code in Interpose directory is written by Xinkai Wang.

Contact for details: xinkaiw [AT] andrew [DOT] cmu [DOT] edu

c-lib-for-data-serialization's People

Contributors

martin31hao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.