Giter VIP home page Giter VIP logo

xv6_net's Introduction

xv6-net

This project is implement TCP/IP Network Stack on xv6.

The network stack uses https://github.com/pandax381/microps

microps is a user-mode TCP/IP stack that I'm developing. This project ported it to the xv6 kernel.

demo

Features

  • Network device
    • PCI
      • Bus scan
      • Find device driver
    • Intel 8254x (e1000) driver
      • Initialization
      • Basic operation of RX/TX with DMA
      • Interrupt trap
      • Detect interrupt souce (if multiple NICs)
    • Device abstraction
      • Define structure for physical device abstraction (struct netdev)
      • Support multiple link protocols and physical devices
  • Protocols
    • Ethernet
    • ARP
    • IP
    • ICMP
    • UDP
    • TCP
  • Network Interface
    • Interface abstraction
      • Define structure for logical interface abstraction (struct netif)
      • Support multiple address family and logical interfaces
    • Configuration
      • ifconfig
  • Socket API
    • Systemcalls
      • socket
      • bind
      • connect
      • listen
      • accept
      • recv
      • send
      • recvfrom
      • sendto
    • Socket descriptor (compatible with File descriptor)
    • Socket address (struct sockaddr)

Task

  • ARP resolution waiting queue (Currently discards data)
  • TCP timer (Currently retransmission timer is not working)
  • DHCP client
  • DNS stub resolver

Tutorial

host run cmd: ip addr add 192.168.1.1/24 dev tap0 Build & Run

$ sudo make run

...(xv6-net starts on qemu)...

$ ifconfig net1 192.168.1.2 netmask 255.255.255.0
$ ifconfig net1 up
$ tcpechoserver
Starting TCP Echo Server
socket: success, soc=3
bind: success, self=0.0.0.0:7
waiting for connection...

...(client connection information and received data are output)...

(switch to qemu monitor with Ctrl-a + c and exit by typing `quit`)

Ping Test (at another terminal)

$ sudo ping 192.168.1.2

TCP Test (at another terminal)

$ sudo nc 192.168.1.2 7

License

xv6: Under the MIT License. See LICENSE file.

Additional code: Under the MIT License. See header of each source code.

xv6_net's People

Contributors

genjigjj 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.