Giter VIP home page Giter VIP logo

multiplex-socket's Introduction

Multiplex-Socket

Introduction

This is the homework of Advanced Programming for Internet in Harbin Institute of Technology.

The repository contains two projects:

Multiplex Server

A TCP and UDP multiplex service for file transfer service using select.

The server can accept both TCP and UDP connections.

Packet Sniffer

Packet sniffers that intercept the network traffic flowing in and out of a system through network interfaces.

The sniffer uses a raw socket when put in recvfrom loop receives all incoming packets Learn More.

Setup

Note: You need to compile this project in Linux or Unix (including Mac OS X).

Compile

You can simply compile this project use make command.

Run Multiplex Server

After the compile operation is successful, you can run the server:

./server <PortNumber>

Then you can start a UDP client or TCP client:

# for TCP client
./tcp-client <ServerIP> <PortNumber>

# for UCP client
./udp-client <ServerIP> <PortNumber>

In TCP client, you can get files from the server:

GET <Path to the file in server>

Known issues:

  • Segment fault will be raised if the path is invalid or the file doesn't exist in server.
  • Segment fault will be caused if you have no previlige to save the file in client.
  • The client may be blocked for unknown reason while transfering files.

Run Packet Sniffers

Note: In Linux/Unix systems, you need root permissions to receive raw packets on an interface. This restriction is a security precaution, because a process that receives raw packets gains access to communications of all other processes and users using that interface.

sudo ./packet-sniffer

All incoming packets will dumped into packet-sniffer.log file.

License

This project is open sourced under Apache license.

multiplex-socket's People

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.