Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
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
Reform
reform-boundary-uboot
Commits
1d10b9e9
Commit
1d10b9e9
authored
17 years ago
by
Wolfgang Denk
Browse files
Options
Downloads
Plain Diff
Merge with /home/wd/git/u-boot/custodian/u-boot-net
parents
2a26ec47
443feb74
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/README.NetConsole
+5
-0
5 additions, 0 deletions
doc/README.NetConsole
net/net.c
+20
-0
20 additions, 0 deletions
net/net.c
with
25 additions
and
0 deletions
doc/README.NetConsole
+
5
−
0
View file @
1d10b9e9
...
@@ -38,6 +38,11 @@ The script expects exactly one argument, which is interpreted as the
...
@@ -38,6 +38,11 @@ The script expects exactly one argument, which is interpreted as the
target IP address (or host name, assuming DNS is working). The script
target IP address (or host name, assuming DNS is working). The script
can be interrupted by pressing ^T (CTRL-T).
can be interrupted by pressing ^T (CTRL-T).
Be aware that in some distributives (Fedora Core 5 at least)
usage of nc has been changed and -l and -p options are considered
as mutually exclusive. If nc complains about options provided,
you can just remove the -p option from the script.
It turns out that 'netcat' cannot be used to listen to broadcast
It turns out that 'netcat' cannot be used to listen to broadcast
packets. We developed our own tool 'ncb' (see tools directory) that
packets. We developed our own tool 'ncb' (see tools directory) that
listens to broadcast packets on a given port and dumps them to the
listens to broadcast packets on a given port and dumps them to the
...
...
This diff is collapsed.
Click to expand it.
net/net.c
+
20
−
0
View file @
1d10b9e9
...
@@ -1424,6 +1424,26 @@ NetReceive(volatile uchar * inpkt, int len)
...
@@ -1424,6 +1424,26 @@ NetReceive(volatile uchar * inpkt, int len)
/* XXX point to ip packet */
/* XXX point to ip packet */
(
*
packetHandler
)((
uchar
*
)
ip
,
0
,
0
,
0
);
(
*
packetHandler
)((
uchar
*
)
ip
,
0
,
0
,
0
);
return
;
return
;
case
ICMP_ECHO_REQUEST
:
#ifdef ET_DEBUG
printf
(
"Got ICMP ECHO REQUEST, return %d bytes
\n
"
,
ETHER_HDR_SIZE
+
len
);
#endif
memcpy
(
&
et
->
et_dest
[
0
],
&
et
->
et_src
[
0
],
6
);
memcpy
(
&
et
->
et_src
[
0
],
NetOurEther
,
6
);
ip
->
ip_sum
=
0
;
ip
->
ip_off
=
0
;
NetCopyIP
((
void
*
)
&
ip
->
ip_dst
,
&
ip
->
ip_src
);
NetCopyIP
((
void
*
)
&
ip
->
ip_src
,
&
NetOurIP
);
ip
->
ip_sum
=
~
NetCksum
((
uchar
*
)
ip
,
IP_HDR_SIZE_NO_UDP
>>
1
);
icmph
->
type
=
ICMP_ECHO_REPLY
;
icmph
->
checksum
=
0
;
icmph
->
checksum
=
~
NetCksum
((
uchar
*
)
icmph
,
(
len
-
IP_HDR_SIZE_NO_UDP
)
>>
1
);
(
void
)
eth_send
((
uchar
*
)
et
,
ETHER_HDR_SIZE
+
len
);
return
;
#endif
#endif
default:
default:
return
;
return
;
...
...
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