#include <lib/stream.h>
#include <lib/thread.h>
#include <lib/vty.h>
+#include <lib/lib_errors.h>
#include "pimd.h"
#include "pim_str.h"
+#include "pim_errors.h"
#include "pim_msdp.h"
#include "pim_msdp_packet.h"
/* If getsockopt is fail, this is fatal error. */
if (ret < 0) {
- zlog_err("can't get sockopt for nonblocking connect");
+ flog_err_sys(EC_LIB_SOCKET,
+ "can't get sockopt for nonblocking connect");
pim_msdp_peer_reset_tcp_conn(mp, "connect-failed");
return;
}
writenum = stream_get_endp(s) - stream_get_getp(s);
/* Call write() system call */
- num = write(mp->fd, STREAM_PNT(s), writenum);
+ num = write(mp->fd, stream_pnt(s), writenum);
if (num < 0) {
/* write failed either retry needed or error */
if (ERRNO_IO_RETRY(errno)) {
if (prefix_len != 32) {
/* ignore SA update if the prefix length is not 32 */
- zlog_err("rxed sa update with invalid prefix length %d",
+ flog_err(EC_PIM_MSDP_PACKET,
+ "rxed sa update with invalid prefix length %d",
prefix_len);
return;
}