summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/socket.h
Commit message (Collapse)AuthorAgeFilesLines
* socket: add function osmo_sock_local_ip() to query local ipPhilipp Maier2017-10-231-0/+2
| | | | | | | | | | In some cases it is required to know the ip-address of the interface through that a given remote IP-Address can be reached. Add function osmo_sock_local_ip() to determine the local ip-address for a given remote ip-address Change-Id: I2988cc52b196fc8476703d1287e24cb4a48491c2
* socket: Add new OSMO_SOCK_F_NO_MCAST_ALL optionHarald Welte2017-07-131-0/+2
| | | | | | | Using this option at socket creation, the caller can request disabling the IP_MULTICAST_ALL socket option. Change-Id: I5ab5de45c0b64ceb3636ea98245a23defa24ffd4
* socket: Allow disabling multicast loop on socket creationHarald Welte2017-07-131-0/+2
| | | | | | | | | | | 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
* socket.c: Add multicast related convenience functionsHarald Welte2017-07-131-0/+6
| | | | Change-Id: Id703e7a7a1e065181a4c76c088b8dcc1b7fe15a2
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-5/+4
| | | | | | | | | | | | | | | | | 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
* doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2017-06-231-1/+1
| | | | | | | | | | 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
* socket: Add osmo_sock_init2_ofd() functionPau Espin Pedrol2017-05-261-0/+4
| | | | | | Will be used by osmo-bts-trx Change-Id: I3c655a4af64fb80497a5aaa811cce8005dba9cd9
* Add osmo_sock_init2() function, allowing both BIND *and* CONNECTHarald Welte2017-04-091-0/+4
| | | | | | | | | 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: Introduce function to obtain socket nameHarald Welte2017-01-271-0/+2
| | | | | | | Using this function, one can obtain a human-readable string identifying the host and port names of the socket. Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3
* Update doxygen annotations in libosmocoreHarald Welte2016-05-051-0/+3
| | | | | This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation.
* include: Switch to #pragma once patternSylvain Munaut2014-06-161-4/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* src/socket: Adding unix domain socket supportÁlvaro Neira Ayuso2014-03-261-0/+6
| | | | | | Added some function for adding the unix domain socket support. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* misc: Fix warning when compiling telnet_interface.cHolger Hans Peter Freyther2012-03-161-0/+1
| | | | | | | | In file included from telnet_interface.c:30:0: osmocom/core/socket.h:25:4: warning: 'struct osmo_fd' declared inside parameter list [enabled by default] telnet_interface.c: In function 'telnet_init_dynif': telnet_interface.c:84:4: warning: passing argument 1 of 'osmo_sock_init_ofd' from incompatible pointer type [enabled by default] osmocom/core/socket.h:24:5: note: expected 'struct osmo_fd *' but argument is of type 'struct osmo_fd *'
* some more doxygen work (include the notion of modules)Harald Welte2011-08-171-38/+6
|
* start to add doxygen documentation to libosmocore headersHarald Welte2011-08-161-1/+42
|
* socket: add OSMO_SOCK_F_[CONNECT|BIND|NON_BLOCK] flagsPablo Neira Ayuso2011-06-131-3/+8
| | | | | | | | 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.
* socket: use listen() and SO_REUSEADDR, new osmo_sock_init_ofd() functionHarald Welte2011-05-221-0/+3
| | | | | | 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.
* GSMTAP/socket code: Check for sys/socket.h and conditionally compileHarald Welte2011-05-221-2/+3
|
* gsmtap: rework GSMTAP API to be more future-proofHarald Welte2011-05-221-0/+16
* 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)