Displaying 20 results from an estimated 111 matches for "sin_family".
2002 Sep 25
2
smbd process with high cpu utilization.
...e of my smbd processes used 100% cpu. I straced the process and the
output follows:
washington:~# strace -p 3416
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=404, len=1},
0xbfffefa0) = 0
sendto(12, "\3\0X\r\0\0&\0\0\0\0\0\0\0\'\374\f\0\0\0\0\0\16\0\0\0", 26, 0,
{sin_family=AF_INET, sin_port=htons(41373),
sin_addr=inet_addr("127.0.0.1")}}, 16) = 26
fcntl64(13, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=404, len=1},
0xbfffefa0) = 0
kill(3382, SIG_0) = 0
fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=404, len=1},
0xb...
2003 Mar 04
6
ip rule nat
when doing somehitng like
ip rule add fwmark 3 nat 200.42.75.183 table ppp0 prio 1
(the idea is that packets that match the fwmark 3 change their source
address to 200.42.75.183)..it first apply the nat and then routes to
table ppp0 right?
in such case the, nat, why may be nat not being applyed?
cause it doesnt work at all..it goes to that interface but does not nat
the src address of the package.
2005 Oct 10
1
Dovecot versus libsafe 2.0.15
Hi,
I encountered a problem using Dovecot (todays CVS, 11/10/2005) with
libsafe, systemwide install. Dovecot silently dies.
Here is the end of the systrace output I got:
bind(6, {sin_family=AF_INET, sin_port=htons(143),
sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
getsockname(6, {sin_family=AF_INET, sin_port=htons(143),
sin_addr=inet_addr("0.0.0.0")}}, [16]) = 0
listen(6, 8) = 0
fcntl64(0x6, 0x3, 0, 0x8072ed8) = 2
fcntl64(0x6, 0x4,...
2009 Jun 08
2
[PATCH] few minor bugfixes
...CK_STREAM, 0);
- if(socketfd < 0){
- return -1;
- }
+ sprintf(port, "%d", vncport);
- serv = gethostbyname(vnchost);
- if(serv == NULL){
+ result = getaddrinfo(vnchost, port, NULL, &vnc_addr);
+ if(result != 0 || vnc_addr == NULL)
return -1;
- }
- serv_addr.sin_family = PF_INET;
- serv_addr.sin_port = htons(vncport);
- serv_addr.sin_addr.s_addr = ((struct in_addr *)(serv->h_addr))->s_addr;
+ // just use first found, ignoring rest
+ socketfd = socket(vnc_addr->ai_family,
+ vnc_addr->ai_socktype,
+ vnc_addr-&g...
2009 Jun 01
2
[PATCH viewer] few minor bugfixes
...struct hostent *serv;
struct sockaddr_in serv_addr;
socketfd = socket(PF_INET, SOCK_STREAM, 0);
@@ -917,14 +918,9 @@ viewer_open_vnc_socket(const char* vnchost, int vncport)
return -1;
}
- serv = gethostbyname(vnchost);
- if(serv == NULL){
- return -1;
- }
-
serv_addr.sin_family = PF_INET;
serv_addr.sin_port = htons(vncport);
- serv_addr.sin_addr.s_addr = ((struct in_addr *)(serv->h_addr))->s_addr;
+ serv_addr.sin_addr.s_addr = inet_addr(vnchost);
if (connect(socketfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr)) < 0){
return -1;
@@ -933,7...
2008 Feb 28
1
C Code to connect to Asterisk Manager Interface
...uot;192.168.0.150"
#define CLIENT_ADDRESS "192.168.0.150"
#define SERVER_PORT 5038
#define CLIENT_PORT 5100
int main()
{
int sd;
struct sockaddr_in serveraddr, clientaddr;
char msg[MAX_MSG_SIZE];
bzero((char *) &serveraddr, sizeof(serveraddr));
serveraddr.sin_family = AF_INET;
serveraddr.sin_addr.s_addr = inet_addr(SERVER_ADDRESS);
serveraddr.sin_port = htons(SERVER_PORT);
bzero((char *) &clientaddr, sizeof(clientaddr));
clientaddr.sin_family = AF_INET;
clientaddr.sin_addr.s_addr = INADDR_ANY;
clientaddr.sin_port = htons(CLIENT_POR...
2014 Dec 15
0
[PATCH] p2v: avoid connecting to ourself while probing qemu-nbd (RHBZ#1167774)
...= 1;
+ struct sockaddr_in src_addr, dst_addr;
time_t start_t, now_t;
struct timeval timeout = { .tv_usec = 0 };
char magic[8]; /* NBDMAGIC */
@@ -413,10 +414,40 @@ wait_qemu_nbd (int nbd_local_port, int timeout_seconds)
return -1;
}
- memset (&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons (nbd_local_port);
- inet_pton (AF_INET, "localhost", &addr.sin_addr);
+ memset (&src_addr, 0, sizeof src_addr);
+ src_addr.sin_family = AF_INET;
+ /* Source port for probing qemu-nbd should be one greater than
+ * nbd_local_port. It's...
2006 Jan 17
0
asterisk.ctl limitations
...+ strncpy(unixsock->sun_path, unixsock_name, sizeof(unixsock->sun_path)-1);
+ //strncpy(unixsock->sun_path, unixsock_name, 108-1);
+ //unixsock->sun_path[sizeof(unixsock->sun_path)-1] = '\0';
+ } else {
+ /* fill in all the right sockaddr crud */
lclend->sin_family = AF_INET;
-/* fill in all the right sockaddr crud */
- lclend->sin_family = AF_INET;
- remend->sin_family = AF_INET;
-
+ /* fill in all the right sockaddr crud */
+ lclend->sin_family = AF_INET;
+ remend->sin_family = AF_INET;
+ }
/* if lad/lp, do appropriate binding */...
2014 Dec 15
2
[PATCH v2 0/1] p2v: avoid connecting to ourself while probing qemu-nbd
Changes since v1:
- Set probing source port to be nbd_local_port+1 instead of always
using 50124 to deal with multi-disk scenario.
- Set SO_REUSEADDR on client socket to avoid issues with old
connections in TIME_WAIT.
I've been running this for a few hours now using the updated
multi-disk test and haven't seen any problems.
2014 Dec 12
2
[PATCH] p2v: avoid connecting to ourself while probing qemu-nbd (RHBZ#1167774)
...ddr;
+ struct sockaddr_in src_addr, dst_addr;
time_t start_t, now_t;
struct timeval timeout = { .tv_usec = 0 };
char magic[8]; /* NBDMAGIC */
@@ -413,10 +423,20 @@ wait_qemu_nbd (int nbd_local_port, int timeout_seconds)
return -1;
}
- memset (&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons (nbd_local_port);
- inet_pton (AF_INET, "localhost", &addr.sin_addr);
+ memset (&src_addr, 0, sizeof src_addr);
+ src_addr.sin_family = AF_INET;
+ src_addr.sin_port = htons (nbd_probe_port);
+ inet_pton (AF_INET, "localhost", &...
2005 Feb 01
5
Cannot save/migrate domains
Hi,
I had a problem trying to migrate domains, in trying to locate it I
noticed that saving domains doesn''t work either, which I believe
explains why the receiving xfrd doesn''t actually receive anything.
So here it goes...
xenone:/tmp# xm list
Name Id Mem(MB) CPU State Time(s) Console
Domain-0 0 123 0 r---- 900.6
sky 9
2004 Apr 20
1
[patch] Raw sockets in jails
Although RAW sockets can be used when specifying the source
address of packets (defeating one of the aspects of the jail)
some people may find it usefull to use utilities like ping(8)
or traceroute(8) from inside jails.
Enclosed is a patch I have written which gives you the option
of allowing prison-root to create raw sockets inside the prison,
so
2002 Nov 21
1
nmblookup not honoring smb.conf?
...10) = 0
ioctl(3, 0x8915, 0xbfffc7f0) = 0
ioctl(3, 0x8913, 0xbfffc7f0) = 0
ioctl(3, 0x891b, 0xbfffc7f0) = 0
close(3) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sin_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
getsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [0], [4]) = 0
getsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], [4]) = 0
getsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], [4]) = 0
getsoc...
2000 Nov 21
1
Openssh-2.2.0pl1 for UnixWare 7.1
UnixWare (not sure when, 7? 7.1?) introduces a new sockaddr_in structure
that splits the 16 bit family entity into an 8-bit length and an 8-bit
familiy memember: (from in.h):
struct sockaddr_in {
#ifdef __NEW_SOCKADDR__
sa_len_t sin_len; /* 8-bit structure length */
#endif
sa_family_t sin_family; /* 8/16-bit address family (AF_INET) */
in_port_t sin_port; /* 16-bit port number */
struct in_addr sin_addr; /* 32-bit internet address */
unsigned char sin_zero[8]; /* optional with TLI */
};
This causes problems with the getaddrinfo() call in canohost.c, since the
family...
2002 Feb 12
1
socket.c: HAVE_SOCKADDR_LEN misspelt as HAVE_SOCK_SIN_LEN
...1.73
+++ socket.c 11 Feb 2002 20:04:33 -0000
@@ -590,7 +590,7 @@
if ((listener = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto failed;
memset(&sock2, 0, sizeof(sock2));
-#ifdef HAVE_SOCK_SIN_LEN
+#ifdef HAVE_SOCKADDR_LEN
sock2.sin_len = sizeof(sock2);
#endif
sock2.sin_family = PF_INET;
--
Jos Backus _/ _/_/_/ Santa Clara, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;
2003 Aug 04
0
Thread woes after 4.7 - 4.8 upgrade
...5
curthread = (struct pthread *) 0x8075800
ret = 0
#2 0x8067576 in ldap_pvt_thread_mutex_lock (mutex=0x80b99d4) at
thr_posix.c:165
mutex = (ldap_pvt_thread_mutex_t *) 0x1
#3 0x804b832 in slapd_daemon (port=0x185) at daemon.c:344
from = {sin_len = 16 '\020', sin_family = 2 '\002', sin_port = 34822,
sin_addr = {s_addr = 420088330}, sin_zero = "\000\000\000\000\000\000\000"}
hp = (struct hostent *) 0x1
len = 16
client_name = 0x28174ce0 "mail.servers.gactr.gc.nat"
client_addr = 0x2817ae80 "10.10.10.25&...
2008 Feb 29
1
cram-md5 crashes passdb
.../var/run/dovecot/login/ssl-parameters.dat",
{st_mode=S_IFREG|0644, st_size=230, ...}) = 0
stat64("/var/lib/dovecot/ssl-parameters.dat", {st_mode=S_IFREG|0644,
st_size=230, ...}) = 0
umask(0) = 077
socket(PF_UNIX, SOCK_STREAM, 0) = 12
bind(12, {sin_family=AF_UNIX, path="/var/run/dovecot/dict-server"}, 110)
= -1 EADDRINUSE (Address already in use)
close(12) = 0
umask(077) = 0
socket(PF_UNIX, SOCK_STREAM, 0) = 12
fcntl64(0xc, 0x3, 0, 0xb7fcfacc) = 2
fcntl64(0xc, 0x4,...
2001 May 31
0
Bug in scp
...d() = 566
566 getuid() = 1000
566 brk(0) = 0x804d4a0
566 brk(0x804d8b8) = 0x804d8b8
566 brk(0x804e000) = 0x804e000
566 socket(PF_UNIX, SOCK_STREAM, 0) = 4
566 connect(4, {sin_family=AF_UNIX, path=" /var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)
566 close(4) = 0
566 open("/etc/nsswitch.conf", O_RDONLY) = 4
566 fstat(4, {s...
2004 Apr 01
1
[patch] net/rsync: problems in client name lookup code
...sin6;
- memset(ssp, 0, ss_len);
- inet_pton(AF_INET6, addr, &sin6.sin6_addr);
- sin6.sin6_family = AF_INET6;
- } else
-#endif
- {
- ssp = (struct sockaddr_storage *) &sin;
- ss_len = sizeof sin;
- memset(ssp, 0, ss_len);
- inet_pton(AF_INET, addr, &sin.sin_addr);
- sin.sin_family = AF_INET;
+ struct addrinfo hint;
+ struct addrinfo *answer;
+ int err;
+
+ memset(&hint, 0, sizeof(hint));
+
+ hint.ai_flags = AI_NUMERICHOST;
+ hint.ai_socktype = SOCK_STREAM;
+
+ err = getaddrinfo(addr, NULL, &hint, &answer);
+ if (err) {
+ rprintf(FERROR, RSYNC_NAME "...
2003 Dec 01
0
No subject
...r/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) =3D 3
fstat64(3, {st_mode=3DS_IFREG|0644, st_size=3D1830272, ...}) =3D 0
mmap2(NULL, 1830272, PROT_READ, MAP_PRIVATE, 3, 0) =3D 0x40032000
close(3) =3D 0
socket(PF_UNIX, SOCK_STREAM, 0) =3D 3
connect(3, {sin_family=3DAF_UNIX, path=3D"/var/run/.nscd_socket"}, 110) =
=3D -1 ENOENT (No such file or directory)
close(3) =3D 0
open("/etc/nsswitch.conf", O_RDONLY) =3D 3
fstat64(3, {st_mode=3DS_IFREG|0644, st_size=3D1743, ...}) =3D 0
mmap2(NULL, 4096, PROT_READ|PR...