Lines Matching refs:sin

87 static int join(int sock, struct sockaddr_in *sin);
103 static int sendmcastif(int s, char *packet, int packetlen, struct sockaddr_in *sin, struct interfac…
222 static __inline__ int isbroadcast(struct sockaddr_in *sin) in isbroadcast() argument
224 return (sin->sin_addr.s_addr == INADDR_BROADCAST); in isbroadcast()
227 static __inline__ int ismulticast(struct sockaddr_in *sin) in ismulticast() argument
229 return IN_CLASSD(ntohl(sin->sin_addr.s_addr)); in ismulticast()
540 solicitor(struct sockaddr_in *sin) in solicitor() argument
548 pr_name(sin->sin_addr)); in solicitor()
559 if (isbroadcast(sin)) in solicitor()
561 else if (ismulticast(sin)) in solicitor()
562 i = sendmcast(s, (char *)outpack, packetlen, sin); in solicitor()
565 (struct sockaddr *)sin, sizeof(struct sockaddr)); in solicitor()
584 advertise(struct sockaddr_in *sin, int lft) in advertise() argument
593 pr_name(sin->sin_addr)); in advertise()
619 if (isbroadcast(sin)) in advertise()
622 else if (ismulticast(sin)) in advertise()
623 cc = sendmcastif( s, (char *)outpack, packetlen, sin, in advertise()
631 if ((sin->sin_addr.s_addr & ifp->netmask.s_addr) == in advertise()
635 pr_name(sin->sin_addr)); in advertise()
641 (struct sockaddr *)sin, in advertise()
832 struct sockaddr_in sin; in pr_pack() local
874 sin.sin_family = AF_INET; in pr_pack()
880 sin.sin_addr.s_addr = htonl(0xe0000001); in pr_pack()
882 sin.sin_addr.s_addr = INADDR_BROADCAST; in pr_pack()
888 sin.sin_addr.s_addr = ip->saddr; in pr_pack()
889 if (!is_directly_connected(sin.sin_addr)) { in pr_pack()
899 advertise(&sin, lifetime); in pr_pack()
1039 sendmcast(int s, char *packet, int packetlen, struct sockaddr_in *sin) in sendmcast() argument
1046 cc = sendmcastif(s, packet, packetlen, sin, &interfaces[i]); in sendmcast()
1055 sendmcastif(int s, char *packet, int packetlen, struct sockaddr_in *sin, in sendmcastif() argument
1078 (struct sockaddr *)sin, sizeof (struct sockaddr)); in sendmcastif()
1106 struct sockaddr_in *sin; in initifs() local
1170 sin = (struct sockaddr_in *)ALLIGN(&ifr->ifr_addr); in initifs()
1171 interfaces[i].localaddr = sin->sin_addr; in initifs()
1184 sin = (struct sockaddr_in *)ALLIGN(&ifreq.ifr_addr); in initifs()
1186 interfaces[i].address = sin->sin_addr; in initifs()
1187 interfaces[i].remoteaddr = sin->sin_addr; in initifs()
1189 interfaces[i].bcastaddr = sin->sin_addr; in initifs()
1199 sin = (struct sockaddr_in *)ALLIGN(&ifreq.ifr_addr); in initifs()
1200 interfaces[i].netmask = sin->sin_addr; in initifs()
1206 sin = (struct sockaddr_in *)ALLIGN(&ifreq.ifr_addr); in initifs()
1207 interfaces[i].bcastaddr = sin->sin_addr; in initifs()
1228 join(int sock, struct sockaddr_in *sin) in join() argument
1236 if (isbroadcast(sin)) in join()
1239 mreq.imr_multiaddr = sin->sin_addr; in join()
1494 struct sockaddr_in *sin; in rtioctl() local
1500 sin = (struct sockaddr_in *)ALLIGN(&rt.rt_gateway); in rtioctl()
1501 sin->sin_addr = addr; in rtioctl()