/********************************************/ /* deliver_packet.h 0.0.0 (1999-Nov-12-Fri) */ /* Adam M. Costello */ /********************************************/ /* Deliver network-layer packets up to the transport layer. */ /* This is ANSI C code. */ #ifndef DELIVER_PACKET_H #define DELIVER_PACKET_H #include #include "network.h" void deliver_packet(struct network_packet packet); /* Delivers a network-layer packet up to the transport layer */ /* of the destination specified in the packet. This begs the */ /* question of whether the packet should go to the transport */ /* source or the transport sink. In this simulation, each */ /* destination has only one or the other, so there's no */ /* ambiguity. In real life, connections are bidirectional, so */ /* there is no distinction between the transport source and */ /* transport sink. But in real life there can be more than */ /* one transport layer (like TCP and UDP), so there is a field */ /* in the network-layer header (which would be a field in our */ /* struct network_packet if we supported this) specifying which */ /* transport protocol the packet is for. */ #endif /* DELIVER_PACKET_H */