15-441 Project 2 Fall 04Project 2Project DirectoryLogical View of SimulatorRealityTo DoNetwork LayerForwarding tableIP headeripforward.hpbufSending a PacketReceiving a Packet115-441 Project 2Fall 04pratyus@csakannan@andrew2Project 2•2a -Implement IP forwarding in the simulator•2b - Implement Routing Daemon3Project Directory•$PDIR = /afs/cs.cmu.edu/academic/class/15441-f04/project2•Read the README•Dir structure–handouts–lib–template–utils–include4Logical View of Simulator5Reality6To Do7Network Layer•Addressing–IPv4 (RFC 791)•Forwarding–Exact match of destination IP in forwarding table–Statically populate forwarding table (proj 2a)8Forwarding table•$PDIR/template/kernel/rtable.h•struct route_entry {};–add–del–change–lookup9IP header•Your implementation need not handle–Fragmentation–Options–Multicast/broadcast–ToS•You must handle–Checksum–Header length–Packet length–Src and destn address–Protocol number–TTL–IP version number10ipforward.h•$PDIR/template/kernel/ipforward.h•void ip_init();•int ip_output(struct pbuf *pkt, int flags, u_char proto, struct in_addr saddr, struct in_addr daddr);•void ip_if_input(struct ifnet *ifp, char *data, int datalen);•void ip_input(struct ifnet *ifp, struct pbuf *pkt);•void ip_input(struct ifnet *ifp, struct pbuf *pkt);11pbuf•$PDIR/include/pbuf.h•Simulator handout (Section 4.5)12Sending a Packet13Receiving a
View Full Document