Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
f4grx
NuttX RTOS
Commits
25d787ff
Commit
25d787ff
authored
10 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Remove use of NET_LL_HDRLEN from net/arp logic. Use ETH_HDRLEN instead
parent
25a9005c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
net/arp/arp_arpin.c
+3
-3
3 additions, 3 deletions
net/arp/arp_arpin.c
net/arp/arp_format.c
+2
-2
2 additions, 2 deletions
net/arp/arp_format.c
net/arp/arp_ipin.c
+1
-1
1 addition, 1 deletion
net/arp/arp_ipin.c
net/arp/arp_out.c
+3
-3
3 additions, 3 deletions
net/arp/arp_out.c
with
9 additions
and
9 deletions
net/arp/arp_arpin.c
+
3
−
3
View file @
25d787ff
...
...
@@ -60,7 +60,7 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[
N
ET
_LL
_HDRLEN])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ET
H
_HDRLEN])
/****************************************************************************
* Private Types
...
...
@@ -106,7 +106,7 @@ void arp_arpin(FAR struct net_driver_s *dev)
FAR
struct
arp_hdr_s
*
parp
=
ARPBUF
;
in_addr_t
ipaddr
;
if
(
dev
->
d_len
<
(
sizeof
(
struct
arp_hdr_s
)
+
N
ET
_LL
_HDRLEN
))
if
(
dev
->
d_len
<
(
sizeof
(
struct
arp_hdr_s
)
+
ET
H
_HDRLEN
))
{
nlldbg
(
"Too small
\n
"
);
dev
->
d_len
=
0
;
...
...
@@ -146,7 +146,7 @@ void arp_arpin(FAR struct net_driver_s *dev)
arp_dump
(
parp
);
peth
->
type
=
HTONS
(
ETHTYPE_ARP
);
dev
->
d_len
=
sizeof
(
struct
arp_hdr_s
)
+
N
ET
_LL
_HDRLEN
;
dev
->
d_len
=
sizeof
(
struct
arp_hdr_s
)
+
ET
H
_HDRLEN
;
}
break
;
...
...
This diff is collapsed.
Click to expand it.
net/arp/arp_format.c
+
2
−
2
View file @
25d787ff
...
...
@@ -60,7 +60,7 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[
N
ET
_LL
_HDRLEN])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ET
H
_HDRLEN])
/****************************************************************************
* Private Types
...
...
@@ -115,7 +115,7 @@ void arp_format(FAR struct net_driver_s *dev, in_addr_t ipaddr)
arp
->
ah_protolen
=
4
;
eth
->
type
=
HTONS
(
ETHTYPE_ARP
);
dev
->
d_len
=
sizeof
(
struct
arp_hdr_s
)
+
N
ET
_LL
_HDRLEN
;
dev
->
d_len
=
sizeof
(
struct
arp_hdr_s
)
+
ET
H
_HDRLEN
;
}
#endif
/* CONFIG_NET_ARP */
This diff is collapsed.
Click to expand it.
net/arp/arp_ipin.c
+
1
−
1
View file @
25d787ff
...
...
@@ -57,7 +57,7 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[
N
ET
_LL
_HDRLEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[ET
H
_HDRLEN])
/****************************************************************************
* Private Types
...
...
This diff is collapsed.
Click to expand it.
net/arp/arp_out.c
+
3
−
3
View file @
25d787ff
...
...
@@ -58,8 +58,8 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[
N
ET
_LL
_HDRLEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[
N
ET
_LL
_HDRLEN])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ET
H
_HDRLEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[ET
H
_HDRLEN])
/****************************************************************************
* Private Types
...
...
@@ -247,7 +247,7 @@ void arp_out(FAR struct net_driver_s *dev)
memcpy
(
peth
->
src
,
dev
->
d_mac
.
ether_addr_octet
,
ETHER_ADDR_LEN
);
peth
->
type
=
HTONS
(
ETHTYPE_IP
);
dev
->
d_len
+=
N
ET
_LL
_HDRLEN
;
dev
->
d_len
+=
ET
H
_HDRLEN
;
}
#endif
/* CONFIG_NET_ARP */
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