tag | line | file | source code |
upd | 213 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 215 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) { |
upd | 216 | net/unix/sock.c | if (upd->refcnt && upd->socket && |
upd | 217 | net/unix/sock.c | upd->socket->state == SS_UNCONNECTED && |
upd | 218 | net/unix/sock.c | upd->sockaddr_un.sun_family == sockun->sun_family && |
upd | 219 | net/unix/sock.c | upd->inode == inode) return(upd); |
upd | 228 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 231 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) { |
upd | 232 | net/unix/sock.c | if (!upd->refcnt) { |
upd | 233 | net/unix/sock.c | upd->refcnt = 1; |
upd | 235 | net/unix/sock.c | upd->socket = NULL; |
upd | 236 | net/unix/sock.c | upd->sockaddr_len = 0; |
upd | 237 | net/unix/sock.c | upd->sockaddr_un.sun_family = 0; |
upd | 238 | net/unix/sock.c | upd->buf = NULL; |
upd | 239 | net/unix/sock.c | upd->bp_head = upd->bp_tail = 0; |
upd | 240 | net/unix/sock.c | upd->inode = NULL; |
upd | 241 | net/unix/sock.c | upd->peerupd = NULL; |
upd | 242 | net/unix/sock.c | return(upd); |
upd | 251 | net/unix/sock.c | unix_data_ref(struct unix_proto_data *upd) |
upd | 253 | net/unix/sock.c | if (!upd) { |
upd | 257 | net/unix/sock.c | ++upd->refcnt; |
upd | 258 | net/unix/sock.c | dprintf(1, "UNIX: data_ref: refing data 0x%x(%d)\n", upd, upd->refcnt); |
upd | 263 | net/unix/sock.c | unix_data_deref(struct unix_proto_data *upd) |
upd | 265 | net/unix/sock.c | if (!upd) { |
upd | 269 | net/unix/sock.c | if (upd->refcnt == 1) { |
upd | 270 | net/unix/sock.c | dprintf(1, "UNIX: data_deref: releasing data 0x%x\n", upd); |
upd | 271 | net/unix/sock.c | if (upd->buf) { |
upd | 272 | net/unix/sock.c | free_page((unsigned long)upd->buf); |
upd | 273 | net/unix/sock.c | upd->buf = NULL; |
upd | 274 | net/unix/sock.c | upd->bp_head = upd->bp_tail = 0; |
upd | 277 | net/unix/sock.c | --upd->refcnt; |
upd | 288 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 295 | net/unix/sock.c | if (!(upd = unix_data_alloc())) { |
upd | 299 | net/unix/sock.c | if (!(upd->buf = (char*) get_free_page(GFP_USER))) { |
upd | 301 | net/unix/sock.c | unix_data_deref(upd); |
upd | 304 | net/unix/sock.c | upd->protocol = protocol; |
upd | 305 | net/unix/sock.c | upd->socket = sock; |
upd | 306 | net/unix/sock.c | UN_DATA(sock) = upd; |
upd | 307 | net/unix/sock.c | dprintf(1, "UNIX: create: allocated data 0x%x\n", upd); |
upd | 315 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(oldsock); |
upd | 317 | net/unix/sock.c | return(unix_proto_create(newsock, upd->protocol)); |
upd | 324 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(sock); |
upd | 326 | net/unix/sock.c | dprintf(1, "UNIX: release: socket 0x%x, unix_data 0x%x\n", sock, upd); |
upd | 327 | net/unix/sock.c | if (!upd) return(0); |
upd | 328 | net/unix/sock.c | if (upd->socket != sock) { |
upd | 332 | net/unix/sock.c | if (upd->inode) { |
upd | 333 | net/unix/sock.c | dprintf(1, "UNIX: release: releasing inode 0x%x\n", upd->inode); |
upd | 334 | net/unix/sock.c | iput(upd->inode); |
upd | 335 | net/unix/sock.c | upd->inode = NULL; |
upd | 338 | net/unix/sock.c | upd->socket = NULL; |
upd | 339 | net/unix/sock.c | if (upd->peerupd) unix_data_deref(upd->peerupd); |
upd | 340 | net/unix/sock.c | unix_data_deref(upd); |
upd | 359 | net/unix/sock.c | struct unix_proto_data *upd = UN_DATA(sock); |
upd | 370 | net/unix/sock.c | if (upd->sockaddr_len || upd->inode) { |
upd | 377 | net/unix/sock.c | memcpy_fromfs(&upd->sockaddr_un, umyaddr, sockaddr_len); |
upd | 378 | net/unix/sock.c | upd->sockaddr_un.sun_path[sockaddr_len-UN_PATH_OFFSET] = '\0'; |
upd | 379 | net/unix/sock.c | if (upd->sockaddr_un.sun_family != AF_UNIX) { |
upd | 381 | net/unix/sock.c | upd->sockaddr_un.sun_family, AF_UNIX); |
upd | 385 | net/unix/sock.c | memcpy(fname, upd->sockaddr_un.sun_path, sockaddr_len-UN_PATH_OFFSET); |
upd | 390 | net/unix/sock.c | if (i == 0) i = open_namei(fname, 0, S_IFSOCK, &upd->inode, NULL); |
upd | 396 | net/unix/sock.c | upd->sockaddr_len = sockaddr_len; /* now its legal */ |
upd | 399 | net/unix/sock.c | sockaddr_un_printk(&upd->sockaddr_un, upd->sockaddr_len); |
upd | 400 | net/unix/sock.c | dprintf(1, "to inode 0x%x\n", upd->inode); |
upd | 543 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 553 | net/unix/sock.c | upd = UN_DATA(sock->conn); |
upd | 555 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 561 | net/unix/sock.c | if (len > upd->sockaddr_len) len = upd->sockaddr_len; |
upd | 566 | net/unix/sock.c | memcpy_tofs(usockaddr, &upd->sockaddr_un, len); |
upd | 577 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 582 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 583 | net/unix/sock.c | while(!(avail = UN_BUF_AVAIL(upd))) { |
upd | 611 | net/unix/sock.c | if (cando >(part = BUF_SIZE - upd->bp_tail)) cando = part; |
upd | 616 | net/unix/sock.c | memcpy_tofs(ubuf, upd->buf + upd->bp_tail, cando); |
upd | 617 | net/unix/sock.c | upd->bp_tail =(upd->bp_tail + cando) &(BUF_SIZE-1); |
upd | 621 | net/unix/sock.c | avail = UN_BUF_AVAIL(upd); |
upd | 707 | net/unix/sock.c | struct unix_proto_data *upd, *peerupd; |
upd | 724 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 726 | net/unix/sock.c | UN_BUF_AVAIL(upd) ? "" : " no"); |
upd | 727 | net/unix/sock.c | if (UN_BUF_AVAIL(upd)) /* even if disconnected */ |
upd | 758 | net/unix/sock.c | struct unix_proto_data *upd, *peerupd; |
upd | 761 | net/unix/sock.c | upd = UN_DATA(sock); |
upd | 770 | net/unix/sock.c | if (UN_BUF_AVAIL(upd) || peerupd) |
upd | 771 | net/unix/sock.c | put_fs_long(UN_BUF_AVAIL(upd),(unsigned long *)arg); |
upd | 887 | net/unix/sock.c | struct unix_proto_data *upd; |
upd | 899 | net/unix/sock.c | for(upd = unix_datas; upd <= last_unix_data; ++upd) { |
upd | 900 | net/unix/sock.c | upd->refcnt = 0; |