aboutsummaryrefslogtreecommitdiffstats
path: root/src/macaddr.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-18Move src/*.{c,h} to src/core/Pau Espin Pedrol1-149/+0
This way we have all libosmocore.so in an own subdir instead of having lots of files in the parent dir, which also contains subdirs to other libraries. This also matches the schema under include/osmocom/. Change-Id: I6c76fafebdd5e961aed88bbecd2c16bc69d580e2
2021-12-14treewide: remove FSF addressOliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I5050285e75cf120407a1d883e99b3c4bcae8ffd7
2020-08-27macaddr: fix osmo_macaddr_parse(): return meaningful error codesVadim Yanitskiy1-2/+3
Change-Id: I316deb83979198acc26721d29708d9942174b192
2020-08-27macaddr: fix osmo_get_macaddr(): return -1 if no device is foundVadim Yanitskiy1-1/+1
Change-Id: I74d33159485ec1f7f09b444621a2d1941c3dd4db
2018-04-18osmo_get_macaddr: Fix buffer read out of boundsPau Espin Pedrol1-2/+7
Catched by address sanitizer in osmo-bts-trx during osmo-gsm-tester test run. ==25503==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55b4e8468780 at pc 0x7fd824f543ba bp 0x7fffc21009f0 sp 0x7fffc21009e8 READ of size 16 at 0x55b4e8468780 thread T0 #0 0x7fd824f543b9 in osmo_get_macaddr libosmocore/src/macaddr.c:132 #1 0x55b4e842df33 in abis_open osmo-bts/src/common/abis.c:256 #2 0x55b4e84286c9 in bts_main osmo-bts/src/common/main.c:342 #3 0x7fd8235ab2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) #4 0x55b4e838e759 in _start (/home/jenkins/workspace/osmo-gsm-tester_run-prod/trial-807/inst/osmo-bts/bin/osmo-bts-trx+0xfc759) Change-Id: I3727ef339279c8eeb85908735467bfd0e02ca259
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte1-0/+2
Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr1-5/+3
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr1-4/+4
Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-12update/extend doxygen documentationHarald Welte1-1/+3
It's a pity that even with this patch we still are fare away from having the whole API documented. However, at least we have a more solid foundation. Updates not only extend the documentation, but also make sure it is rendered properly in the doxygen HTML. Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
2017-01-23disable various code if building for bare-iron embeddedHarald Welte1-0/+6
We don't have file-based I/O nor ethernet devices with mac addresses when building for OsmocomBB. Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5
2016-05-05Update doxygen annotations in libosmocoreHarald Welte1-2/+25
This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation.
2015-04-11macaddr: Use the BSD code for Darwin as wellHolger Hans Peter Freyther1-1/+1
It simply compiles, no other testing has been done.
2014-12-04fix libosmocore build for NuttX targetHarald Welte1-0/+1
this fixes some compilation issues with libosmocore under NuttX, particularly as some #defines are missing or some header files are slightly different.
2014-09-11add missing copyright statements to source code filesHarald Welte1-0/+22
Some source code files didn't have the usual copyright and licence statement at their top. I'm adding them baesed on information in the commitlog.
2014-08-21macaddr: Add some code for FreeBSD (it should work on the others too)Holger Hans Peter Freyther1-0/+41
There doesn't seem to be a way to share this code with Linux as it doesn't have the sockaddr_dl concept inside the getifaddrs. I manually verified this on a FreeBSD10 box and hex decoding gave me the correct mac address and rc was 0.
2014-08-21macaddr: add #include unistd.h for close() functionHarald Welte1-0/+1
this fixes a compile warning
2014-08-18Add osmo_get_macaddr() function to obtain etherent mac addressHarald Welte1-0/+26
This used to be private in osmo-bts/common/abis.c, where it really didn't belong.
2014-08-18osmocore: Add function osmo_macaddr_parse() to parse ETH MAC addressHarald Welte1-0/+25