Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
8abba574
Commit
8abba574
authored
Apr 29, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dump routing tables on SIGUSR1.
parent
21e6343a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
babel.c
babel.c
+16
-3
No files found.
babel.c
View file @
8abba574
...
@@ -72,13 +72,12 @@ int protocol_port;
...
@@ -72,13 +72,12 @@ int protocol_port;
unsigned
char
protocol_group
[
16
];
unsigned
char
protocol_group
[
16
];
int
protocol_socket
=
-
1
;
int
protocol_socket
=
-
1
;
static
volatile
sig_atomic_t
exiting
=
0
;
static
volatile
sig_atomic_t
exiting
=
0
,
dumping
=
0
;
struct
network
*
add_network
(
char
*
ifname
,
int
ifindex
,
int
bufsize
,
struct
network
*
add_network
(
char
*
ifname
,
int
ifindex
,
int
bufsize
,
int
wired
,
unsigned
int
cost
,
int
hello_interval
);
int
wired
,
unsigned
int
cost
,
int
hello_interval
);
void
expire_routes
(
void
);
void
expire_routes
(
void
);
static
void
sigexit
(
int
signo
);
static
void
init_signals
(
void
);
static
void
init_signals
(
void
);
static
void
dump_tables
(
FILE
*
out
);
static
void
dump_tables
(
FILE
*
out
);
...
@@ -430,8 +429,10 @@ main(int argc, char **argv)
...
@@ -430,8 +429,10 @@ main(int argc, char **argv)
}
}
}
}
if
(
debug
)
if
(
debug
||
dumping
)
{
dump_tables
(
stdout
);
dump_tables
(
stdout
);
dumping
=
0
;
}
}
}
debugf
(
"Exiting...
\n
"
);
debugf
(
"Exiting...
\n
"
);
...
@@ -500,6 +501,12 @@ sigexit(int signo)
...
@@ -500,6 +501,12 @@ sigexit(int signo)
exiting
=
1
;
exiting
=
1
;
}
}
static
void
sigdump
(
int
signo
)
{
dumping
=
1
;
}
static
void
static
void
init_signals
(
void
)
init_signals
(
void
)
{
{
...
@@ -523,6 +530,12 @@ init_signals(void)
...
@@ -523,6 +530,12 @@ init_signals(void)
sa
.
sa_mask
=
ss
;
sa
.
sa_mask
=
ss
;
sa
.
sa_flags
=
0
;
sa
.
sa_flags
=
0
;
sigaction
(
SIGINT
,
&
sa
,
NULL
);
sigaction
(
SIGINT
,
&
sa
,
NULL
);
sigemptyset
(
&
ss
);
sa
.
sa_handler
=
sigdump
;
sa
.
sa_mask
=
ss
;
sa
.
sa_flags
=
0
;
sigaction
(
SIGUSR1
,
&
sa
,
NULL
);
}
}
static
void
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment