Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
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
Service Desk
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
Verlässliche Systemsoftware
projects
osv
Commits
eff57822
Commit
eff57822
authored
12 years ago
by
Guy Zana
Browse files
Options
Downloads
Patches
Plain Diff
Enable an interface in the net driver test
parent
2df8a514
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bsd/sys/netinet/if_ether.c
+4
-0
4 additions, 0 deletions
bsd/sys/netinet/if_ether.c
tests/tst-bsd-netdriver.c
+14
-1
14 additions, 1 deletion
tests/tst-bsd-netdriver.c
with
18 additions
and
1 deletion
bsd/sys/netinet/if_ether.c
+
4
−
0
View file @
eff57822
...
...
@@ -872,6 +872,7 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa)
if
(
ntohl
(
IA_SIN
(
ifa
)
->
sin_addr
.
s_addr
)
!=
INADDR_ANY
)
{
arprequest
(
ifp
,
&
IA_SIN
(
ifa
)
->
sin_addr
,
&
IA_SIN
(
ifa
)
->
sin_addr
,
(
u_char
*
)
IF_LLADDR
(
ifp
));
#if 0
/*
* interface address is considered static entry
* because the output of the arp utility shows
...
...
@@ -886,6 +887,9 @@ arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa)
"entry for interface address\n");
else
LLE_RUNLOCK(lle);
#else
lle
=
NULL
;
#endif
}
ifa
->
ifa_rtrequest
=
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
tests/tst-bsd-netdriver.c
+
14
−
1
View file @
eff57822
...
...
@@ -17,6 +17,9 @@
/* Global ifnet */
struct
ifnet
*
pifp
;
/*
* This function should invoke ether_ioctl...
*/
static
int
lge_ioctl
(
struct
ifnet
*
ifp
,
u_long
command
,
...
...
@@ -26,10 +29,20 @@ lge_ioctl(struct ifnet *ifp,
return
(
0
);
}
/*
* Main transmit routine.
*/
static
void
lge_start
(
struct
ifnet
*
ifp
)
{
struct
mbuf
*
m_head
=
NULL
;
TLOG
(
"lge_start
\n
"
);
IF_DEQUEUE
(
&
ifp
->
if_snd
,
m_head
);
if
(
m_head
!=
NULL
)
{
/* Send packet */
}
}
static
void
...
...
@@ -103,7 +116,7 @@ int main(void)
*/
if_attachdomain
(
NULL
);
//
set_address();
set_address
();
destroy_if
();
TLOG
(
"BSD Net Driver Test
\n
"
);
...
...
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