Lines Matching defs:ts
99 tsd_t *ts = (tsd_t *)tsd;
105 ts->ts_lsns = (int *)malloc(lm_optB * sizeof (int));
106 if (ts->ts_lsns == NULL)
109 ts->ts_adds = (struct sockaddr_in *)malloc(lm_optB *
111 if (ts->ts_adds == NULL)
116 if ((ts->ts_lsns[i] = socket(PF_INET, SOCK_STREAM, 0)) == -1)
119 if (setsockopt(ts->ts_lsns[i], SOL_SOCKET, SO_REUSEADDR,
126 (void) memset(&ts->ts_adds[i], 0,
128 ts->ts_adds[i].sin_family = AF_INET;
129 ts->ts_adds[i].sin_port = (optz ? 0 : htons(j++));
130 (void) memcpy(&ts->ts_adds[i].sin_addr.s_addr,
139 tsd_t *ts = (tsd_t *)tsd;
143 if ((bind(ts->ts_lsns[i],
144 (struct sockaddr *)&ts->ts_adds[i],
157 tsd_t *ts = (tsd_t *)tsd;
161 (void) close(ts->ts_lsns[i]);