Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ITS-Bridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Plugtests
ITS Plugtests
ITS-Bridge
Commits
4c66089e
Commit
4c66089e
authored
4 years ago
by
Yann Garcia
Browse files
Options
Downloads
Patches
Plain Diff
Add log in its_bridge_client
parent
e3b738e3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
src/its_bridge_client.c
+2
-0
2 additions, 0 deletions
src/its_bridge_client.c
with
3 additions
and
1 deletion
Makefile
+
1
−
1
View file @
4c66089e
...
...
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME
:=
its_bridge
PKG_REFV
:=
2
PKG_VERSION
:=
0.0.1
2
PKG_VERSION
:=
0.0.1
PKG_RELEASE
:=
1
include
$(INCLUDE_DIR)/package.mk
...
...
This diff is collapsed.
Click to expand it.
src/its_bridge_client.c
+
2
−
0
View file @
4c66089e
...
...
@@ -41,6 +41,7 @@ void sig_usr1_handler(int p_signal) {
}
void
pcap_message_callback
(
u_char
*
p_args
,
const
struct
pcap_pkthdr
*
p_pkthdr
,
const
u_char
*
p_packet
)
{
printf
(
"pcap_message_callback: packet sent to %s:%d.
\n
"
,
inet_ntoa
(
remote_addr
.
sin_addr
),
htons
(
remote_addr
.
sin_port
));
if
(
sendto
(
socket_hd
,
p_packet
,
p_pkthdr
->
caplen
,
0
,
(
struct
sockaddr
*
)
&
remote_addr
,
sizeof
(
remote_addr
))
<
0
)
{
fprintf
(
stderr
,
"pcap_message_callback: 'sento' failure: %s, continue.
\n
"
,
strerror
(
errno
));
}
...
...
@@ -238,6 +239,7 @@ int main(const int32_t p_argc, char* const p_argv[]) {
if
(
pcap_setfilter
(
device
,
&
f
)
!=
0
)
{
fprintf
(
stderr
,
"Failed to set PCAP filter.
\n
"
);
pcap_close
(
device
);
pcap_freecode
(
&
f
);
goto
error
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment