summaryrefslogtreecommitdiff
path: root/zebra/irdp_packet.c
AgeCommit message (Collapse)Author
2009-12-10zebra: deal with irdp compile warningsStephen Hemminger
* zebra/irdp.h * irdp_send_thread(): move prototype to common header file * irdp_advert_off(): idem * process_solicit(): idem * irdp_read_raw(): idem * send_packet(): idem * zebra/irdp_interface.c * inet_2a(): move function to where it is used * in_cksum(): lib/checksum.h already provides prototype * irdp_send_thread(): prototype moved away * inet_2a(): idem * irdp_advert_off(): idem * b1, b2, b3, b4: get rid of global buffers for inet_2a() * if_group(): add local buffer for inet_2a() * if_add_group(): idem * if_drop_group(): idem * irdp_config_write(): idem * Adv_new(): make static * zebra/irdp_main.c * irdp_read_raw(): prototype moved away * send_packet(): idem * in_cksum(): lib/checksum.h already provides prototype * inet_2a(): function moved to irdp_interface.c * zebra/irdp_packet.c * b1, b2, b3, b4: get rid of global buffers for inet_2a() * in_cksum(): lib/checksum.h already provides prototype * process_solicit(): prototype moved away * irdp_read_raw(): fix uninitialized variable
2009-06-19[cleanup] convert bzero() deprecated by POSIX to memset()Jeremy Jackson
autoscan 2.62 complains about bzero(), so a good fix nowadays is to just replace it.
2006-08-04[zebra] IRDP: Move stream_free to where its created, probably fixing a leakPaul Jakma
2006-08-01 Paul Jakma <paul.jakma@sun.com> * irdp_main.c: (irdp_advertisement) free the stream here, when done, right under where it was allocated so it's blindingly obvious it's correct. This possibly fixes a very slow leak of streams in zebra. * irdp_packet.c: (send_packet) don't free the stream here as it's hard to tell if right, plus an error case seemed to returning before free anyway.
2005-03-302005-03-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* irdp.h: Add prototype for irdp_sock_init, and fix protos for other irdp_* functions. * irdp_interface.c: (irdp_if_start) If irdp_sock is negative, call irdp_sock_init to create the IRDP socket. (irdp_if_init) Rename to irdp_init(). (get_iflist_ifp) Remove function that is a duplicate of if_lookup_by_index. (*) Make many functions static. And remove superfluous "\n" from several zlog messages. * irdp_main.c: (irdp_init) Remove function that used to call irdp_if_init() and irdp_sock_init(), since we will now create the socket only upon first use. (irdp_sock_init) Do not update global irdp_sock variable, just return the fd and assume that the caller will do so. If setsockopt calls fail, close the socket before returning -1. (*) Make many functions static. * irdp_packet.c: Initialize irdp_sock to -1. (irdp_read_raw) Call standard library function if_lookup_by_index instead of get_iflist_ifp. (irdp_recvmsg) Should be static, not global.
2005-02-092005-02-09 Paul Jakma <paul.jakma@sun.com>paul
* (global) Update code to match stream.h changes. stream_get_putp effectively replaced with stream_get_endp. stream_forward renamed to stream_forward_getp. stream_forward_endp introduced to replace some previous setting/manual twiddling of putp by daemons. * lib/stream.h: Remove putp. Update reference to putp with endp. Add stream_forward_endp, which daemons were doing manually. Rename stream_forward to stream_forward_getp. lib/stream.c: Remove/update references to putp. introduce stream_forward_endp.
2004-12-072004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-11-202004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
2004-10-052004-10-05 Paul Jakma <paul@dishone.st>paul
* irdp_packet.c: (parse_irdp_packet) style issues. Use sockopt_iphdrincl_swab_systoh. Try unbork the code. Checksum the ICMP data and actually compare it to received checksum. Check data length against claimed length in header. Always use ntoh.. when accessing addresses, even when the comparison happens to be endian-safe. (send_packet) minor style isues. Use sockopt_iphdrincl_swab_htosys. (irdp_iph_hton/ntoh) IP header to/from network/host order.
2004-09-26Compiler warnings fixes.hasso
2004-09-242004-09-24 Paul Jakma <paul@dishone.st>paul
* irdp_{interface,main}.c: lists typedef removal cleanup. update some list loops to LIST_LOOP. some miscellaneous style and indent fixups. (no_ip_irdp_address_preference_cmd) Fix delete of referenced node in loop. * irdp_packet.c: (irdp_recvmsg) Fix buggy assignment of integer to pointer. * if_ioctl{,_solaris}.c: lists typedef removal cleanup. update some list loops to LIST_LOOP.
2004-08-192004-08-19 Paul Jakma <paul@dishone.st>paul
* irdp_main.c: update to match sockopt renames. * irdp_packet.c: include sockopt.h and update to match sockopt renames.
2004-07-232004-07-23 Paul Jakma <paul@dishone.st>paul
* irdp_main.c: use setsockopt_pktinfo_ipv4 * irdp_packet.c: use SOPT_SIZE_CMSG_PKTINFO_IPV4 and getsockopt_pktinfo_ifindex()
2004-06-12OK, here it is - irdp support. But don't expect me to fix any bugs in it.hasso