socket

  1. Manifestor

    Async socket

    I’m trying to build a streaming server using sockets with C language. First I tried linux and io_uring. It works ok but only for small files (~ 2 MB). With io_uring I’ve managed to do async read/write to socket. Then I’ve read about FreeBSD and Kqueue so I decided to give it a try and I need...
  2. K

    Add multicast group membership to an interface

    I'm using netmap and a tap interface to manipulate network traffic with a c-program. Everything works fine when the physical interface is in promiscuous mode, but I want to avoid that. The problem is that I'm not receiving multicast frames on the physical interface because the programs...
  3. B

    jail getaddrinfo recvfrom hangs 5 seconds and returns "Name does not resolve"

    Please help! What is wrong in my configuration? Where to look for an error? I had upgraded system to releng/12.3 but I got the same behaviour. [root:~]# uname -a FreeBSD hostname 12.2-RELEASE-p10 FreeBSD 12.2-RELEASE-p10 12803d8a99c(releng/12.2) CUSTOM amd64 on host machine: # ifconfig...
  4. decuser

    C Good way to learn basics of network programming in FreeBSD

    I've looked at the Handbook, Developer's handbook, and pored through a number of google searches and haven't found what I'm looking for. I would like to learn to write network programs on FreeBSD, in C. What is a good way for me to learn the basics? I have seen lots of books, but I'm a little...
  5. F

    what are other type of data exept files

    What are link, pipe and socket files and how to use them? and what are non-text type of files that I dont know of?
  6. zirias@

    C Behavior of connect() with O_NONBLOCK on a Unix domain socket

    For a service that can optionally listen on a local (Unix) socket, I want to implement detection of a "stale" socket, so it can startup without user intervention in this case by just unlinking the stale socket. As my service is designed around an event loop using pselect, I put all sockets into...
  7. S

    SO_BINDTODEVICE undeclared on freebsd 12

    Hi all, What can I use instead of SO_BINDTODEVICE? I'm on FreeBSD 12.1. The linux code is: ret = setsockopt(r->sock_rx, SOL_SOCKET, SO_BINDTODEVICE, r->vr->ifp->name, strlen(r->vr->ifp->name));
  8. Farhan Khan

    C Get numeric IP representation with getaddrinfo(1)

    Hi all, I am trying to perform two operations and wondering if I can use one libc function to do both. Specifically: Determine if a certain string is an IPv4 or IPv6 address Get its numeric IP representation. (ie, ::1 is 1, 192.168.1.1 is 3232235777) Currently, I am using getaddrinfo for the...
  9. L

    MariaDB socket in jail not created at host boot

    There's a jail for MariaDB mysql Ver 15.1 Distrib 10.2.15-MariaDB, for FreeBSD11.1 (amd64) using readline 5.1. A socket should be created in /var/run/mysql [client] port = 3306 socket = /var/run/mysql/mysql.sock [mysqld] port = 3306 socket =...
  10. sysnes

    Send command to jail from main host - Socket with openssl api

    Hi, first of all I want to thanks for this community, this forum have rich content. Is possible to send a command from the main host to jail host? Like this: ezjail-admin console WEBSERVER | nginx -s reload I want to restart a service and check status, so I think I need to do this via...
  11. D

    PF Socket connectivity between jails on different interfaces.

    Hi all- I recently jailed my externally-web-accessible services for security reasons. I currently have two separate jails: vpnjail: this jail hosts rtorrent, and connects to the outside world over a persistent openvpn connection on tun0. webjail: this jail hosts standard webservices such as...
  12. D

    Solved PQconnectdb() causes program to crash

    I'm a little all over the place with this question so please read to the end. This is a program that connects to the database but really wasn't as I just found out. I have a program in C that talks to nginx, locally, to serve web pages via FastCGI and this works well. I use spawn-fcgi for the...
  13. A

    ftp server socket listen backlog is limited - "listen backlog limit Vs kernel maxfile limit"

    From ftp server code, we are limiting the connections to1024 (s.listen (1024) call), but when I do the sockstress tool test it overflowing the listen backlog limit to 12000+ connection. So my system reaching the kern.maxfile limit. Overflow scenario is Vulnerable to the system with sockstress...
  14. M

    lighttpd fails to start on Jail.

    Before www/apache24 was running on this jail. Removed it and restarted the jail after installing www/lighttpd root@http52:~ # service lighttpd start Starting lighttpd. 2016-03-06 07:24:16: (network.c.250) socket failed: Protocol not supported /usr/local/etc/rc.d/lighttpd: WARNING: failed to...
Back
Top