/* Make socket for Babel protocol. */
protocol_socket = babel_socket(protocol_port);
if (protocol_socket < 0) {
- flog_err_sys(LIB_ERR_SOCKET, "Couldn't create link local socket: %s",
+ flog_err_sys(EC_LIB_SOCKET, "Couldn't create link local socket: %s",
safe_strerror(errno));
goto fail;
}
(struct sockaddr*)&sin6, sizeof(sin6));
if(rc < 0) {
if(errno != EAGAIN && errno != EINTR) {
- flog_err_sys(LIB_ERR_SOCKET, "recv: %s", safe_strerror(errno));
+ flog_err_sys(EC_LIB_SOCKET, "recv: %s", safe_strerror(errno));
}
} else {
FOR_ALL_INTERFACES(vrf, ifp) {
return;
}
- flog_err(BABEL_ERR_CONFIG,
+ flog_err(EC_BABEL_CONFIG,
"Warning: couldn't find router id -- using random value.");
rc = read_random_bytes(myid, 8);
if(rc < 0) {
- flog_err(BABEL_ERR_CONFIG, "read(random): %s (cannot assign an ID)",
+ flog_err(EC_BABEL_CONFIG, "read(random): %s (cannot assign an ID)",
safe_strerror(errno));
exit(1);
}
if(receive_buffer == NULL) {
receive_buffer = malloc(size);
if(receive_buffer == NULL) {
- flog_err(BABEL_ERR_MEMORY, "malloc(receive_buffer): %s",
+ flog_err(EC_BABEL_MEMORY, "malloc(receive_buffer): %s",
safe_strerror(errno));
return -1;
}
unsigned char *new;
new = realloc(receive_buffer, size);
if(new == NULL) {
- flog_err(BABEL_ERR_MEMORY, "realloc(receive_buffer): %s",
+ flog_err(EC_BABEL_MEMORY, "realloc(receive_buffer): %s",
safe_strerror(errno));
return -1;
}