diff options
author | ajs <ajs> | 2005-02-23 15:43:01 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-02-23 15:43:01 +0000 |
commit | 5c33349b3efff36a6acd36c6600b61e7cc2dbffc (patch) | |
tree | ec55763c7a1401489464bacde9115b06b3b0b467 /ospfd/ChangeLog | |
parent | 9fc7ebf10b7bb638ddf6d1b4b2d562dd417866fc (diff) |
2005-02-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospfd.h: Add new field struct stream *ibuf to struct ospf.
* ospfd.c: (ospf_new) Check return code from ospf_sock_init.
Allocate ibuf using stream_new(OSPF_MAX_PACKET_SIZE+1).
(ospf_finish) Call stream_free(ospf->ibuf.
* ospf_packet.c: (ospf_read) Call stream_reset(ospf->ibuf) and then
pass it to ospf_recv_packet for use in receiving the packet
(instead of allocating a new stream for each packet received).
Eliminate all calls to stream_free(ibuf).
(ospf_recv_packet) The struct stream *ibuf is now passed in as
an argument. No need to use recvfrom to peek at the packet
header (to see how big it is), just use ospf->ibuf which is
always large enough (this eliminates a system call to recvfrom).
Therefore, no need to allocate a stream just for this packet,
and no need to free it when done.
Diffstat (limited to 'ospfd/ChangeLog')
-rw-r--r-- | ospfd/ChangeLog | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index ee30e55c..668999f9 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,20 @@ +2005-02-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu> + + * ospfd.h: Add new field struct stream *ibuf to struct ospf. + * ospfd.c: (ospf_new) Check return code from ospf_sock_init. + Allocate ibuf using stream_new(OSPF_MAX_PACKET_SIZE+1). + (ospf_finish) Call stream_free(ospf->ibuf. + * ospf_packet.c: (ospf_read) Call stream_reset(ospf->ibuf) and then + pass it to ospf_recv_packet for use in receiving the packet + (instead of allocating a new stream for each packet received). + Eliminate all calls to stream_free(ibuf). + (ospf_recv_packet) The struct stream *ibuf is now passed in as + an argument. No need to use recvfrom to peek at the packet + header (to see how big it is), just use ospf->ibuf which is + always large enough (this eliminates a system call to recvfrom). + Therefore, no need to allocate a stream just for this packet, + and no need to free it when done. + 2005-02-23 Vincenzo Eramo <eramo at infocom.ing.uniroma1.it> * ospf_lsa.h: New flag to the LSA structure for the SPF calculation. |