• Home
  • Raw
  • Download

Lines Matching full:so

119  * (b) locked by SOCK_LOCK(so).
120 * (c) locked by SOCKBUF_LOCK(&so->so_rcv).
121 * (d) locked by SOCKBUF_LOCK(&so->so_snd).
199 #define SB_RAW (64*1024*2) /*Aligning so->so_rcv.sb_hiwat with the receive buffer size …
422 * How much space is there in a socket buffer (so->so_snd or so->so_rcv)?
432 #define sosendallatonce(so) \ argument
433 ((so)->so_proto->pr_flags & PR_ATOMIC)
435 /* can we read something from so? */
436 #define soreadable(so) \ argument
437 ((so)->so_rcv.sb_cc >= (so)->so_rcv.sb_lowat || \
438 ((so)->so_rcv.sb_state & SBS_CANTRCVMORE) || \
439 !TAILQ_EMPTY(&(so)->so_comp) || (so)->so_error)
441 /* can we write something to so? */
442 #define sowriteable(so) \ argument
443 ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
444 (((so)->so_state&SS_ISCONNECTED) || \
445 ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0)) || \
446 ((so)->so_snd.sb_state & SBS_CANTSENDMORE) || \
447 (so)->so_error)
480 #define soref(so) do { \ argument
481 SOCK_LOCK_ASSERT(so); \
482 ++(so)->so_count; \
485 #define sorele(so) do { \ argument
487 SOCK_LOCK_ASSERT(so); \
488 KASSERT((so)->so_count > 0, ("sorele")); \
489 if (--(so)->so_count == 0) \
490 sofree(so); \
492 SOCK_UNLOCK(so); \
497 #define sotryfree(so) do { \ argument
499 SOCK_LOCK_ASSERT(so); \
500 if ((so)->so_count == 0) \
501 sofree(so); \
503 SOCK_UNLOCK(so); \
516 #define sorwakeup_locked(so) do { \ argument
517 SOCKBUF_LOCK_ASSERT(&(so)->so_rcv); \
518 if (sb_notify(&(so)->so_rcv)) \
519 sowakeup((so), &(so)->so_rcv); \
521 SOCKBUF_UNLOCK(&(so)->so_rcv); \
524 #define sorwakeup(so) do { \ argument
525 SOCKBUF_LOCK(&(so)->so_rcv); \
526 sorwakeup_locked(so); \
529 #define sowwakeup_locked(so) do { \ argument
530 SOCKBUF_LOCK_ASSERT(&(so)->so_snd); \
531 if (sb_notify(&(so)->so_snd)) \
532 sowakeup((so), &(so)->so_snd); \
534 SOCKBUF_UNLOCK(&(so)->so_snd); \
537 #define sowwakeup(so) do { \ argument
538 SOCKBUF_LOCK(&(so)->so_snd); \
539 sowwakeup_locked(so); \
559 (struct socket *so, void *arg, int waitflag);
561 (struct socket *so, char *arg);
563 (struct socket *so);
580 int do_getopt_accept_filter(struct socket *so, struct sockopt *sopt);
581 int do_setopt_accept_filter(struct socket *so, struct sockopt *sopt);
582 int so_setsockopt(struct socket *so, int level, int optname,
604 void sbdestroy(struct sockbuf *sb, struct socket *so);
611 void sbrelease(struct sockbuf *sb, struct socket *so);
612 void sbrelease_locked(struct sockbuf *sb, struct socket *so);
613 int sbreserve(struct sockbuf *sb, u_long cc, struct socket *so,
615 int sbreserve_locked(struct sockbuf *sb, u_long cc, struct socket *so,
623 void soabort(struct socket *so);
624 int soaccept(struct socket *so, struct sockaddr **nam);
625 int socheckuid(struct socket *so, uid_t uid);
626 int sobind(struct socket *so, struct sockaddr *nam, struct thread *td);
627 void socantrcvmore(struct socket *so);
628 void socantrcvmore_locked(struct socket *so);
629 void socantsendmore(struct socket *so);
630 void socantsendmore_locked(struct socket *so);
631 int soclose(struct socket *so);
632 int soconnect(struct socket *so, struct sockaddr *nam, struct thread *td);
637 int sodisconnect(struct socket *so);
639 void sofree(struct socket *so);
640 int sogetopt(struct socket *so, struct sockopt *sopt);
641 void sohasoutofband(struct socket *so);
642 void soisconnected(struct socket *so);
643 void soisconnecting(struct socket *so);
644 void soisdisconnected(struct socket *so);
645 void soisdisconnecting(struct socket *so);
646 int solisten(struct socket *so, int backlog, struct thread *td);
647 void solisten_proto(struct socket *so, int backlog);
648 int solisten_proto_check(struct socket *so);
659 int sopoll(struct socket *so, int events, struct ucred *active_cred,
661 int sopoll_generic(struct socket *so, int events,
663 int soreceive(struct socket *so, struct sockaddr **paddr, struct uio *uio,
665 int soreceive_generic(struct socket *so, struct sockaddr **paddr,
668 int soreserve(struct socket *so, u_long sndcc, u_long rcvcc);
669 void sorflush(struct socket *so);
670 int sosend(struct socket *so, struct sockaddr *addr, struct uio *uio,
673 int sosend_dgram(struct socket *so, struct sockaddr *addr,
676 int sosend_generic(struct socket *so, struct sockaddr *addr,
679 int sosetopt(struct socket *so, struct sockopt *sopt);
680 int soshutdown(struct socket *so, int how);
681 void sotoxsocket(struct socket *so, struct xsocket *xso);
682 void sowakeup(struct socket *so, struct sockbuf *sb);
725 void soisconnecting(struct socket *so);
726 void soisdisconnecting(struct socket *so);
727 void soisconnected(struct socket *so);
729 void socantrcvmore(struct socket *so);
730 void socantsendmore(struct socket *so);
731 void sofree(struct socket *so);
739 #define soref(so) do { \ argument
740 SOCK_LOCK_ASSERT(so); \
741 ++(so)->so_count; \
744 #define sorele(so) do { \ argument
746 SOCK_LOCK_ASSERT(so); \
747 KASSERT((so)->so_count > 0, ("sorele")); \
748 if (--(so)->so_count == 0) \
749 sofree(so); \
751 SOCK_UNLOCK(so); \
763 #define sosendallatonce(so) \ argument
764 ((so)->so_proto->pr_flags & PR_ATOMIC)
766 /* can we read something from so? */
767 #define soreadable(so) \ argument
768 ((int)((so)->so_rcv.sb_cc) >= (so)->so_rcv.sb_lowat || \
769 ((so)->so_rcv.sb_state & SBS_CANTRCVMORE) || \
770 !TAILQ_EMPTY(&(so)->so_comp) || (so)->so_error)
774 #define sowriteable(so) \
775 ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
776 (((so)->so_state&SS_ISCONNECTED) || \
777 ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0)) || \
778 ((so)->so_snd.sb_state & SBS_CANTSENDMORE) || \
779 (so)->so_error)
781 /* can we write something to so? */
782 #define sowriteable(so) \ argument
783 ((sbspace(&(so)->so_snd) >= (so)->so_snd.sb_lowat && \
784 (((so)->so_state&SS_ISCONNECTED))) || \
785 ((so)->so_snd.sb_state & SBS_CANTSENDMORE) || \
786 (so)->so_error)
789 extern void solisten_proto(struct socket *so, int backlog);
790 extern int solisten_proto_check(struct socket *so);
791 extern int sctp_listen(struct socket *so, int backlog, struct proc *p);
792 extern void socantrcvmore_locked(struct socket *so);
793 extern int sctp_bind(struct socket *so, struct sockaddr *addr);
794 extern int sctp6_bind(struct socket *so, struct sockaddr *addr, void *proc);
796 extern int sctpconn_bind(struct socket *so, struct sockaddr *addr);
798 extern int sctp_accept(struct socket *so, struct sockaddr **addr);
799 extern int sctp_attach(struct socket *so, int proto, uint32_t vrf_id);
800 extern int sctp6_attach(struct socket *so, int proto, uint32_t vrf_id);
801 extern int sctp_abort(struct socket *so);
802 extern int sctp6_abort(struct socket *so);
803 extern void sctp_close(struct socket *so);
804 extern int soaccept(struct socket *so, struct sockaddr **nam);
805 extern int solisten(struct socket *so, int backlog);
806 extern int soreserve(struct socket *so, u_long sndcc, u_long rcvcc);
807 extern void sowakeup(struct socket *so, struct sockbuf *sb);
808 extern void wakeup(void *ident, struct socket *so); /*__Userspace__ */
811 extern int sodisconnect(struct socket *so);
812 extern int soconnect(struct socket *so, struct sockaddr *nam);
813 extern int sctp_disconnect(struct socket *so);
814 extern int sctp_connect(struct socket *so, struct sockaddr *addr);
815 extern int sctp6_connect(struct socket *so, struct sockaddr *addr);
817 extern int sctpconn_connect(struct socket *so, struct sockaddr *addr);
840 #define sorwakeup_locked(so) do { \ argument
841 SOCKBUF_LOCK_ASSERT(&(so)->so_rcv); \
842 if (sb_notify(&(so)->so_rcv)) \
843 sowakeup((so), &(so)->so_rcv); \
845 SOCKBUF_UNLOCK(&(so)->so_rcv); \
848 #define sorwakeup(so) do { \ argument
849 SOCKBUF_LOCK(&(so)->so_rcv); \
850 sorwakeup_locked(so); \
853 #define sowwakeup_locked(so) do { \ argument
854 SOCKBUF_LOCK_ASSERT(&(so)->so_snd); \
855 if (sb_notify(&(so)->so_snd)) \
856 sowakeup((so), &(so)->so_snd); \
858 SOCKBUF_UNLOCK(&(so)->so_snd); \
861 #define sowwakeup(so) do { \ argument
862 SOCKBUF_LOCK(&(so)->so_snd); \
863 sowwakeup_locked(so); \