| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
If osmo_sock_init2() was used with CONNECT flag but without BIND
flag, an invalid check for "did we create a socket yet" caused
the socket to never be created, and subsequently the entire function
to return an error.
Change-Id: I0206dbb9c5b8f74d7fb088576941b092acd2ca22
|
|
|
|
|
|
|
| |
Using this option at socket creation, the caller can request disabling
the IP_MULTICAST_ALL socket option.
Change-Id: I5ab5de45c0b64ceb3636ea98245a23defa24ffd4
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new flag OSMO_SOCK_F_NO_MCAST_LOOP, which can be used
to disable the looping back of multicast packets transmitted throug this
socket to other local sockets on the machine.
As this looping-back is active by default, a single option to deviate
from the default is deemed sufficient.
Change-Id: I24a5b1ebc3f84d2d5d4734e54df50efaea26490b
|
|
|
|
|
|
|
|
|
| |
We had three places at the end of socket initialization functions
calling listen(). Let's unify that and fix some bugs:
* close + return error in case of bad listen() result
* don't call listen() on AF_UNIX SOCK_DGRAM sockets
Change-Id: I7e8dbe3c0486bb3b9810b0add1331e93fc106d82
|
|
|
|
| |
Change-Id: Id703e7a7a1e065181a4c76c088b8dcc1b7fe15a2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a string like
127.0.0.1:2905<->127.0.0.1:60661
it is hard to tell which is the local part. I'd have expected it on the left,
but it is actually on the right.
To avoid doubt and bypass bikesheds on which side should be what, clearly mark
the two sides as remote and local.
(r=127.0.0.1:2905<->l=127.0.0.1:60661)
Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Will be used by osmo-bts-trx
Change-Id: I3c655a4af64fb80497a5aaa811cce8005dba9cd9
|
|
|
|
|
|
|
|
|
| |
The old osmo_sock_init() function allows only either a bind (for a
server socket), or a connect (for a client socket), but not both
together. So there's no way to have a client socket that is bound to a
specific local IP and/or port, which is needed for some use cases.
Change-Id: Idab124bcca47872f55311a82d6818aed590965e6
|
|
|
|
|
|
|
| |
socket.c still uses fprintf to output error messages. This commit
replaces the fprintf with proper LOGP messages.
Change-Id: Ia2993415d5f5c33ccd719af239ff59252d11b764
|
|
|
|
|
|
|
| |
Using this function, one can obtain a human-readable string identifying
the host and port names of the socket.
Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3
|
|
|
|
|
|
|
| |
We forgot to call freeaddrinfo() in an error path.
Change-Id: Iccbd3beef4c4a70dc443131b909c45e650d8c6a2
Fixes: Coverity CID 135217
|
|
|
|
|
|
|
| |
error messages'
Related: CID#143566
Change-Id: I75c542089749a0875d3d1913151fe838d7722ff2
|
|
|
|
|
|
|
|
|
|
|
| |
For programs like osmo-hnbgw with numerous sockets, the message that some
unspecified connection was refused is not very helpful. Also output the host
and port where an error occured.
Instead of perror, use fprintf(stderr, ..., strerror()) to be able to include a
format string and print host and port as passed to osmo_sock_init().
Change-Id: I8d0343f51310699b78fcb83fd76fd93764acf3dc
|
|
|
|
|
| |
This adds and improves doxygen API descriptions all over libosmocore,
reducing the 'white spots' that don't have any documentation.
|
|
|
|
| |
Signed-off-by: Max <max.suraev@fairwaves.co>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Added some function for adding the unix domain socket support.
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
|
|
|
|
|
| |
Doxygen generates quite a lot of warnings on libosmocore. Some of them
are obvious typos - this patch aims to fix such low-hanging fruit.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getaddrinfo returns EAI_SERVICE (-8) if that combination is used.
More information available in here:
http://sourceware.org/bugzilla/show_bug.cgi?id=15015
Reported by Holger Hans Peter Freyther.
While at it, this patch also removes hints.ai_flags = 0 as memset
to zero already happened just a bit before that.
|
|
|
|
| |
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
|
|
|
| |
in e476442cf0e84c65565ace545f5b73602b5f0ffc we changed from sockle_t
to unsigned int, but only in the header, not in the implementation!
|
|
|
|
|
|
|
|
|
|
|
| |
alloca.h is not available on FreeBSD, use the default autoconf
function to check for it, there is a complete list[1] of what to
do for using alloca but let us see how far we get with this test.
Include netinet/in.h for the IPv4 and IPv6 socket address. Check
for dlopen in libraries and use this instead of linking -dl.
[1] http://www.gnu.org/s/hello/manual/autoconf/Particular-Functions.html
|
| |
|
|
|
|
|
|
|
|
| |
This extends the socket infrastructure in libosmocore to allow
to create non-blocking sockets.
Basically, it replaces the connect0_bind1 parameter by one
flags parameter.
|
|
|
|
| |
This will tell getaddrinfo() that we want a INADDR_ANY style socket
|
| |
|
|
|
|
| |
Apparently getifaddrs() returns ifa's without an ifa_addr set.
|
|
|
|
|
|
| |
osmo_sock_init_ofd() is a wrapper around osmo_sock_init() which will
take care of initializing and registering a 'struct osmo_fd' for the
newly-created socket.
|
| |
|
| |
|
|
* use write_queue where applicable
* provide functions that work on raw FD and those with osmo_fd
* add support for multiple gsmtap instances (no global variables)
|