summaryrefslogtreecommitdiffstats
path: root/src/socket.c
Commit message (Collapse)AuthorAgeFilesLines
* fix printf format for commit 'osmo_sock_init(): include host and port in ↵Neels Hofmeyr2016-08-291-1/+1
| | | | | | | error messages' Related: CID#143566 Change-Id: I75c542089749a0875d3d1913151fe838d7722ff2
* osmo_sock_init(): include host and port in error messagesNeels Hofmeyr2016-08-271-5/+16
| | | | | | | | | | | 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
* Update doxygen annotations in libosmocoreHarald Welte2016-05-051-0/+6
| | | | | This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation.
* Move common socket routine into separate functionMax2014-10-131-29/+24
| | | | Signed-off-by: Max <max.suraev@fairwaves.co>
* add missing copyright statements to source code filesHarald Welte2014-09-111-0/+21
| | | | | | 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.
* src/socket: Adding unix domain socket supportÁlvaro Neira Ayuso2014-03-261-0/+102
| | | | | | Added some function for adding the unix domain socket support. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
* misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi2013-02-151-1/+1
| | | | | Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
* socket: fix osmo_sock_init with SOCK_RAW and IPPROTO_RAWPablo Neira Ayuso2013-01-151-3/+16
| | | | | | | | | | | | | 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.
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* sync prototype of osmo_sockaddr_is_local with declarationHarald Welte2012-04-081-1/+1
| | | | | in e476442cf0e84c65565ace545f5b73602b5f0ffc we changed from sockle_t to unsigned int, but only in the header, not in the implementation!
* freebsd: Fixes for the compilation of libosmocore on FreeBSDHolger Hans Peter Freyther2011-11-091-0/+2
| | | | | | | | | | | 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
* some more doxygen work (include the notion of modules)Harald Welte2011-08-171-1/+48
|
* socket: add OSMO_SOCK_F_[CONNECT|BIND|NON_BLOCK] flagsPablo Neira Ayuso2011-06-131-10/+28
| | | | | | | | 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: getaddrinfo(): set AI_PASSIVE if we want to bindHarald Welte2011-05-311-0/+3
| | | | This will tell getaddrinfo() that we want a INADDR_ANY style socket
* socket: remove unused IPv4 related header includesHarald Welte2011-05-291-2/+0
|
* socket: Skip ifa's without ifa->ifa_addrHarald Welte2011-05-241-0/+2
| | | | Apparently getifaddrs() returns ifa's without an ifa_addr set.
* socket: use listen() and SO_REUSEADDR, new osmo_sock_init_ofd() functionHarald Welte2011-05-221-1/+34
| | | | | | 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.
* remove debug printf from socket.cHarald Welte2011-05-221-1/+0
|
* GSMTAP/socket code: Check for sys/socket.h and conditionally compileHarald Welte2011-05-221-1/+5
|
* gsmtap: rework GSMTAP API to be more future-proofHarald Welte2011-05-221-0/+143
* 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)