"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ipc.c" between
mrouted-4.3.tar.gz and mrouted-4.4.tar.gz

About: mrouted is an implementation of the DVMRP multicast routing protocol.

ipc.c  (mrouted-4.3):ipc.c  (mrouted-4.4)
skipping to change at line 38 skipping to change at line 38
*/ */
#include <errno.h> #include <errno.h>
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/un.h> #include <sys/un.h>
#include "defs.h" #include "defs.h"
extern struct rtentry *routing_table;
static struct sockaddr_un sun; static struct sockaddr_un sun;
static int ipc_socket = -1; static int ipc_socket = -1;
static int ipc_write(int sd, struct ipc *msg) static int ipc_write(int sd, struct ipc *msg)
{ {
ssize_t len; ssize_t len;
while ((len = write(sd, msg, sizeof(*msg)))) { while ((len = write(sd, msg, sizeof(*msg)))) {
if (-1 == len && EINTR == errno) if (-1 == len && EINTR == errno)
skipping to change at line 220 skipping to change at line 219
if (!detail) if (!detail)
fprintf(fp, "%-15s %-15s %-15s=\n", fprintf(fp, "%-15s %-15s %-15s=\n",
"Origin", "Neighbor", "Interface"); "Origin", "Neighbor", "Interface");
else else
fprintf(fp, "%-15s %-15s %-15s%6s %8s=\n", fprintf(fp, "%-15s %-15s %-15s%6s %8s=\n",
"Origin", "Neighbor", "Interface", "Cost", "Expire"); "Origin", "Neighbor", "Interface", "Cost", "Expire");
} }
static void show_routes(FILE *fp, int detail) static void show_routes(FILE *fp, int detail)
{ {
struct rtentry *r; struct rtentry *r = NULL;
vifi_t i;
int once = 1; int once = 1;
if (!routing_table) while (route_iter(&r)) {
return;
for (r = routing_table; r; r = r->rt_next) {
if (once) { if (once) {
show_routes_header(fp, detail); show_routes_header(fp, detail);
once = 0; once = 0;
} }
fprintf(fp, "%-15s %-15s %-15s", fprintf(fp, "%-15s %-15s %-15s",
inet_fmts(r->rt_origin, r->rt_originmask, s1, sizeof(s1)) , inet_fmts(r->rt_origin, r->rt_originmask, s1, sizeof(s1)) ,
(r->rt_gateway == 0 (r->rt_gateway == 0
? "Local" ? "Local"
: inet_fmt(r->rt_gateway, s2, sizeof(s2))), : inet_fmt(r->rt_gateway, s2, sizeof(s2))),
skipping to change at line 274 skipping to change at line 269
else else
fprintf(fp, "%-15s %-15s %-15s %2s%10s %8s %s=\n", fprintf(fp, "%-15s %-15s %-15s %2s%10s %8s %s=\n",
"Origin", "Group", "Inbound", "<>", "Uptime", "Expire", " Outbound"); "Origin", "Group", "Inbound", "<>", "Uptime", "Expire", " Outbound");
} }
static void show_mfc(FILE *fp, int detail) static void show_mfc(FILE *fp, int detail)
{ {
struct rtentry *r; struct rtentry *r;
struct gtable *gt; struct gtable *gt;
struct stable *st; struct stable *st;
struct ptable *pt;
time_t thyme = time(NULL); time_t thyme = time(NULL);
vifi_t i; vifi_t i;
char flags[5]; char flags[5];
char c;
int once = 1; int once = 1;
for (gt = kernel_no_route; gt; gt = gt->gt_next) { for (gt = kernel_no_route; gt; gt = gt->gt_next) {
if (gt->gt_srctbl) { if (gt->gt_srctbl) {
if (once) { if (once) {
show_mfc_header(fp, detail); show_mfc_header(fp, detail);
once = 0; once = 0;
} }
fprintf(fp, "%-15s %-15s %-16s", fprintf(fp, "%-15s %-15s %-16s",
 End of changes. 5 change blocks. 
9 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)