+static void sendinf(struct fnetnode *fn)
+{
+ struct adchub *hub = fn->data;
+ struct socket *sk = hub->sk;
+ struct sockaddr_in *a4;
+ socklen_t alen;
+
+ sendadc(sk, 0, L"BINF", hub->sid, NULL);
+ sendadc(sk, 1, L"PD", ns, privid, L"ID", ns, cid, NULL);
+ sendadc(sk, 1, L"VEDolda ", ns, icsmbstowcs(VERSION, "us-ascii", NULL), NULL);
+ sendadc(sk, 1, L"NI", ns, fn->mynick, NULL);
+ sendadc(sk, 1, L"SS", ns, fmt, L"mi", (intmax_t)sharesize, L"SF", ns, fmt, L"i", sharedfiles, NULL);
+ if(sockfamily(sk) == AF_INET)
+ sendadc(sk, 1, L"I40.0.0.0", NULL);
+ else if(sockfamily(sk) == AF_INET6)
+ sendadc(sk, 1, L"I6::", NULL);
+ sendadc(sk, 1, L"SL", ns, fmt, L"i", confgetint("transfer", "slot"), NULL);
+ if(tcpsock != NULL) {
+ if((sockfamily(sk) == AF_INET) && !sockgetremotename(udpsock, (struct sockaddr **)&a4, &alen)) {
+ sendadc(sk, 1, L"U4", ns, fmt, L"i", ntohs(a4->sin_port), NULL);
+ free(a4);
+ }
+ }
+ sendadc(sk, 1, eoc, NULL);
+}
+