Travis Geiselbrecht
6ed6f36fa0
[warnings] remove some redundant declarations
...
Discovered with -Wredundant-decls
2024-04-19 00:07:49 -07:00
Pedro Falcato
bf2e94c2f8
[minip] Fix undefined behavior in mac_addr_copy
...
There was a possibly unaligned store in mac_addr_copy.
Replace it with a memcpy call that should generate equivalent,
well defined code.
2023-02-18 16:47:16 -08:00
Milis Linux
c4676e9445
[tcp] remove extra printf
2022-08-14 18:50:32 -07:00
Travis Geiselbrecht
6ad3643165
[lib][minip] add an arg to the ethernet transmit callback
...
Already had the registration hook for it, but was never used.
2022-03-19 15:06:57 -07:00
Travis Geiselbrecht
fe28bd8a95
[lib][minip] add a mechanism to wait for the stack to be configured
...
Configured in this case means an ip address assigned and a nic
installed.
2022-03-19 14:46:01 -07:00
Travis Geiselbrecht
9caf62273c
[lib][minip] start of TCP connect state machine
...
A few miscellaneous tweaks outside of that.
2022-03-19 14:43:55 -07:00
Travis Geiselbrecht
9d94fac5e3
[minip][dhcp] convert the dhcp utility into a C++ class
...
Mostly jsut a consolidation of what was already an object oriented
piece of code.
2021-12-31 20:37:40 -08:00
Travis Geiselbrecht
9e80081ea6
[minip] fix warning in new changes
...
Building with -Werror locally.
2021-12-31 20:37:40 -08:00
Travis Geiselbrecht
35da2d1260
[minip][dhcp] spiff up the state machine to handle more edge cases
...
-Add TAP option to scripts/qemux86
2021-12-31 17:23:57 -08:00
Travis Geiselbrecht
b5a9c2d8b2
[lib][minip] a few fixes
...
-Add C++ header guards around the public api.
-Fix a divide by zero bug in the test console routine.
-Add a new pktbuf api to assist with resetting a pktbuf back to default
values for reuse in an ethernet driver.
2021-12-27 22:24:31 -08:00
Travis Geiselbrecht
06105c5835
[lib][minip] fix a bug in the dhcp code
...
Minor bug where it would get the mac address out of sync with what the
hardware really has.
2021-12-27 22:24:31 -08:00
Travis Geiselbrecht
fcb65c9a88
[dev/lib][warnings] fix -Wmissing-declarations warnings in dev/ and lib/
2021-10-21 23:16:20 -07:00
Travis Geiselbrecht
8a8debbe3d
[warning] fix a few warnings that pop up with gcc 10.2
2020-07-26 23:42:02 -07:00
Travis Geiselbrecht
f7d8e2300c
[warnings] add -Wshadow which helps detect local variables that override globals
...
Nothing particularly bad showed up but cleaned up a bit of code.
2020-07-25 16:49:25 -07:00
Travis Geiselbrecht
4edb93adde
[lib][console] rename some console command types to be prefixed with console_
...
Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_
The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func
Apologies if this breaks you but it should be pretty easy to fix.
2020-07-25 15:59:58 -07:00
Travis Geiselbrecht
f371fa246b
[arch] move the atomic ops into a separate header
...
Now you need to include arch/atomic.h to get to the atomic routines.
This simplifies a recusion issue in the way arch/ops.h included
arch_ops. Also just generally makes things cleaner.
2020-05-16 15:05:34 -07:00
Travis Geiselbrecht
6cb02526b7
[include][console] split lib/console.h into two
...
TL;DR most uses of lib/console.h -> lk/console_cmd.h
Move the part that lets a piece of code somewhere in the system to
define a console command from the actual lib/console api to start an
instance of the console. Move in almost every place the user of the
console command definition to the new header, lk/console_cmd.h which is
always in the include path.
Also remove most uses of testing for WITH_LIB_CONSOLE since you can
almost always just safely define it and then let the linker remove it.
2019-07-13 16:56:33 -07:00
Travis Geiselbrecht
3aecdda231
[includes] replace header guards with #pragma once
2019-07-13 15:46:16 -07:00
Travis Geiselbrecht
cba9e47987
[license] replace the longer full MIT license with a shorter one
...
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91
[formatting] run everything through codestyle
...
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.
See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8
[include][lk] fixup lk/ include path move
2019-06-19 19:46:11 -07:00
Travis Geiselbrecht
5dea3e1933
[warnings] fix a few warnings introduced with newer version of gcc
...
Most of the warnings are new, such as needing to mark fallthroughs on
cases explicitly. A few are based on signed vs unsigned comparisons.
Disable one warning that was annoying about comparing null to arguments
marked nonnull.
2018-03-15 14:10:12 -07:00
klemens
d0b90c2d68
[spelling] spelling-fixes. (not external/)
2016-08-25 17:30:34 -07:00
Travis Geiselbrecht
a4ca0a6e00
[vmm] move most users of arch_mmu_query directly to vaddr_to_paddr()
2016-02-14 12:45:53 -08:00
Travis Geiselbrecht
d569c090ea
[vim] remove vim expandtab comments on most of the files
2016-02-14 12:32:07 -08:00
Travis Geiselbrecht
2eb32a4369
[style] mass reformat all the non external code to 4 space indents
...
Ran everything through scripts/codestyle.space, which uses astyle
to generally follow K&R style.
Biggest non whitespace change is pulling brackets down on function
declarations, which I'm pretty ambivalent about, but astyle insists
on taking a stance
2016-02-14 12:24:01 -08:00
Travis Geiselbrecht
4ab14424bd
[cppcheck] clean up a few suggestions from cppcheck
2015-11-24 15:08:38 -08:00
Travis Geiselbrecht
3b2d7a268b
[make] remove the need for a module to manually add $(LOCAL_DIR)/include to the global include path
...
Pretty much every module in the system was already doing it, so do it
automatically.
2015-10-19 19:07:16 -07:00
Travis Geiselbrecht
95bae7b1e7
[lib][minip] add utility routine to generate a random mac address
...
-Move both stm32f7xx targets to this mechanism
2015-10-15 11:48:08 -07:00
Travis Geiselbrecht
215b5ed07f
[64bit] fix a few more 64bit warnings in newer code
2015-09-20 13:11:51 -07:00
Christopher Anderson
393b8f7698
[pktbuf] Move memset from free to alloc
2015-09-15 16:28:53 -07:00
Christopher Anderson
388fd4fe4d
[minip][udp] Passing a NULL callback to udp_listen will now remove an existing listener
2015-09-15 16:28:52 -07:00
Christopher Anderson
72d6c4b125
[minip][pktbuf] Fix warning with phys_base
2015-09-15 16:28:52 -07:00
Christopher Anderson
53d486900f
[minip][pktbuf] Allow external buffers to be attached to a pktbuf
...
- Buffers can now be added to a pktbuf to avoid copying
- A callback can be supplied with an optional argument to free the buffer when
a driver is finished with it.
2015-09-15 16:28:52 -07:00
Christopher Anderson
0b86a01228
[minip][pktbuf] Move End of Frame to a flag
2015-09-15 16:28:52 -07:00
Christopher Anderson
9a5589a4a4
[minip][pktbuf] Move pktbuf allocation to a common pool
...
Rather than having a pool for pktbuf buffers and a pool for pktbufs, move
them to a common pool.
2015-09-15 16:28:52 -07:00
Travis Geiselbrecht
0406715fcd
[lib][minip] allocate the send buffer off of the heap when using udp tester
2015-09-14 14:24:38 -07:00
Travis Geiselbrecht
e25f47cde3
[lib][minip] check eth packets for proper target address
...
-add routine to print eth packet if trace enabled
-fix printf in arp
2015-09-10 14:00:19 -07:00
Travis Geiselbrecht
e6b8202566
[minip][dhcp] fix an off by one error in the dhcp request that caued some servers to reject it
2015-09-09 15:39:02 -07:00
Christopher Anderson
26104fb6d6
[minip] Add arp commands
2015-09-02 14:29:01 -07:00
Christopher Anderson
9d22be607a
[minip] UDP test now will use default parameters for any not supplied
2015-09-02 14:29:01 -07:00
Travis Geiselbrecht
c3c8f68595
[lib][pktbuf] fix a warning on the no-vm path
2015-08-31 13:01:00 -07:00
Brian Swetland
3729d00f00
[lib][minip] fix build on non-zynq platforms
2015-06-25 17:49:38 -07:00
Nathaniel Quillin
6243633389
[lib][minip] add string utility for parsing ip addresses
...
Change-Id: If8270c7b48a63e4bddbad7754213e974c29b8744
2015-06-16 18:12:20 -07:00
Travis Geiselbrecht
96ba54f187
[merge] merge back from smp branch
2015-05-28 12:52:41 -07:00
Nathaniel Quillin
4af4bb5a83
[lib][minip] moved udp to its own file
...
Change-Id: I2467d850110db14ebbf5c4ac68a835818f664246
2015-05-20 22:15:56 +00:00
Arve Hjønnevåg
2c9c5959e7
Merge branch 'master' of https://github.com/travisg/lk into smp
...
Change-Id: Iecb11d57b6f089234c0826932bdb229588939750
2015-05-18 16:49:37 -07:00
Nathaniel Quillin
9b8e7bc33c
[lib][minip] change udp_send() to use iovecs
...
Change-Id: I7befe1bb6c857f63ad810ae72f7fba0db57f4693
2015-05-12 14:44:30 -07:00
Travis Geiselbrecht
613e1c3457
[lib][minip] avoid a double copy in udp_send()
...
Change-Id: I2b786f0bcbf9b9da73034ee5d98bb5d4402968e1
2015-05-12 12:07:18 -07:00
Travis Geiselbrecht
db1911ecdf
[lib][minip] few optimizations
...
-optimize mac address copies
-tcp skip rx checksum if nic has already done it
-add run time tcp debugging switch
2015-05-06 16:26:07 -07:00