• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/include/net/

Lines Matching refs:sock

8  * Version:	@(#)sock.h	1.0.4	05/13/93
78 SOCK_DEBUG(struct sock *sk, const char *msg, ...)
102 struct sock;
124 * for struct sock and struct inet_timewait_sock.
156 * struct sock - network layer representation of sockets
162 * @sk_wq: sock wait queue and async head
187 * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt,
206 * @sk_timer: sock cleanup timer
217 * @sk_state_change: callback to indicate change in the state of the sock
222 * @sk_destruct: called at sock freeing time, i.e. when all refcnt == 0
224 struct sock {
319 void (*sk_state_change)(struct sock *sk);
320 void (*sk_data_ready)(struct sock *sk, int bytes);
321 void (*sk_write_space)(struct sock *sk);
322 void (*sk_error_report)(struct sock *sk);
323 int (*sk_backlog_rcv)(struct sock *sk,
325 void (*sk_destruct)(struct sock *sk);
331 static inline struct sock *sk_entry(const struct hlist_node *node)
333 return hlist_entry(node, struct sock, sk_node);
336 static inline struct sock *__sk_head(const struct hlist_head *head)
338 return hlist_entry(head->first, struct sock, sk_node);
341 static inline struct sock *sk_head(const struct hlist_head *head)
346 static inline struct sock *__sk_nulls_head(const struct hlist_nulls_head *head)
348 return hlist_nulls_entry(head->first, struct sock, sk_nulls_node);
351 static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)
356 static inline struct sock *sk_next(const struct sock *sk)
359 hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL;
362 static inline struct sock *sk_nulls_next(const struct sock *sk)
366 struct sock, sk_nulls_node) :
370 static inline int sk_unhashed(const struct sock *sk)
375 static inline int sk_hashed(const struct sock *sk)
390 static __inline__ void __sk_del_node(struct sock *sk)
396 static __inline__ int __sk_del_node_init(struct sock *sk)
412 static inline void sock_hold(struct sock *sk)
420 static inline void __sock_put(struct sock *sk)
425 static __inline__ int sk_del_node_init(struct sock *sk)
438 static __inline__ int __sk_nulls_del_node_init_rcu(struct sock *sk)
447 static __inline__ int sk_nulls_del_node_init_rcu(struct sock *sk)
459 static __inline__ void __sk_add_node(struct sock *sk, struct hlist_head *list)
464 static __inline__ void sk_add_node(struct sock *sk, struct hlist_head *list)
470 static __inline__ void sk_add_node_rcu(struct sock *sk, struct hlist_head *list)
476 static __inline__ void __sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
481 static __inline__ void sk_nulls_add_node_rcu(struct sock *sk, struct hlist_nulls_head *list)
487 static __inline__ void __sk_del_bind_node(struct sock *sk)
492 static __inline__ void sk_add_bind_node(struct sock *sk,
548 static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
553 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag)
558 static inline void sock_reset_flag(struct sock *sk, enum sock_flags flag)
563 static inline int sock_flag(struct sock *sk, enum sock_flags flag)
568 static inline void sk_acceptq_removed(struct sock *sk)
573 static inline void sk_acceptq_added(struct sock *sk)
578 static inline int sk_acceptq_is_full(struct sock *sk)
586 static inline int sk_stream_min_wspace(struct sock *sk)
591 static inline int sk_stream_wspace(struct sock *sk)
596 extern void sk_stream_write_space(struct sock *sk);
598 static inline int sk_stream_memory_free(struct sock *sk)
604 static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
621 static inline bool sk_rcvqueues_full(const struct sock *sk, const struct sk_buff *skb)
629 static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
639 static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
644 static inline void sock_rps_record_flow(const struct sock *sk)
656 static inline void sock_rps_reset_flow(const struct sock *sk)
668 static inline void sock_rps_save_rxhash(struct sock *sk, u32 rxhash)
690 extern int sk_stream_wait_connect(struct sock *sk, long *timeo_p);
691 extern int sk_stream_wait_memory(struct sock *sk, long *timeo_p);
692 extern void sk_stream_wait_close(struct sock *sk, long timeo_p);
693 extern int sk_stream_error(struct sock *sk, int flags, int err);
694 extern void sk_stream_kill_queues(struct sock *sk);
696 extern int sk_wait_data(struct sock *sk, long *timeo);
708 void (*close)(struct sock *sk,
710 int (*connect)(struct sock *sk,
713 int (*disconnect)(struct sock *sk, int flags);
715 struct sock * (*accept) (struct sock *sk, int flags, int *err);
717 int (*ioctl)(struct sock *sk, int cmd,
719 int (*init)(struct sock *sk);
720 void (*destroy)(struct sock *sk);
721 void (*shutdown)(struct sock *sk, int how);
722 int (*setsockopt)(struct sock *sk, int level,
725 int (*getsockopt)(struct sock *sk, int level,
729 int (*compat_setsockopt)(struct sock *sk,
733 int (*compat_getsockopt)(struct sock *sk,
738 int (*sendmsg)(struct kiocb *iocb, struct sock *sk,
740 int (*recvmsg)(struct kiocb *iocb, struct sock *sk,
744 int (*sendpage)(struct sock *sk, struct page *page,
746 int (*bind)(struct sock *sk,
749 int (*backlog_rcv) (struct sock *sk,
753 void (*hash)(struct sock *sk);
754 void (*unhash)(struct sock *sk);
755 void (*rehash)(struct sock *sk);
756 int (*get_port)(struct sock *sk, unsigned short snum);
764 void (*enter_memory_pressure)(struct sock *sk);
809 static inline void sk_refcnt_debug_inc(struct sock *sk)
814 static inline void sk_refcnt_debug_dec(struct sock *sk)
821 static inline void sk_refcnt_debug_release(const struct sock *sk)
849 static inline void __sk_prot_rehash(struct sock *sk)
876 struct socket *sock;
877 struct sock *sk;
911 extern int __sk_mem_schedule(struct sock *sk, int size, int kind);
912 extern void __sk_mem_reclaim(struct sock *sk);
924 static inline int sk_has_account(struct sock *sk)
930 static inline int sk_wmem_schedule(struct sock *sk, int size)
938 static inline int sk_rmem_schedule(struct sock *sk, int size)
946 static inline void sk_mem_reclaim(struct sock *sk)
954 static inline void sk_mem_reclaim_partial(struct sock *sk)
962 static inline void sk_mem_charge(struct sock *sk, int size)
969 static inline void sk_mem_uncharge(struct sock *sk, int size)
976 static inline void sk_wmem_free_skb(struct sock *sk, struct sk_buff *skb)
1018 extern void lock_sock_nested(struct sock *sk, int subclass);
1020 static inline void lock_sock(struct sock *sk)
1025 extern void release_sock(struct sock *sk);
1034 extern bool lock_sock_fast(struct sock *sk);
1043 static inline void unlock_sock_fast(struct sock *sk, bool slow)
1052 extern struct sock *sk_alloc(struct net *net, int family,
1055 extern void sk_free(struct sock *sk);
1056 extern void sk_release_kernel(struct sock *sk);
1057 extern struct sock *sk_clone(const struct sock *sk,
1060 extern struct sk_buff *sock_wmalloc(struct sock *sk,
1063 extern struct sk_buff *sock_rmalloc(struct sock *sk,
1069 extern int sock_setsockopt(struct socket *sock, int level,
1073 extern int sock_getsockopt(struct socket *sock, int level,
1076 extern struct sk_buff *sock_alloc_send_skb(struct sock *sk,
1080 extern struct sk_buff *sock_alloc_send_pskb(struct sock *sk,
1085 extern void *sock_kmalloc(struct sock *sk, int size,
1087 extern void sock_kfree_s(struct sock *sk, void *mem, int size);
1088 extern void sk_send_sigurg(struct sock *sk);
1091 extern void sock_update_classid(struct sock *sk);
1093 static inline void sock_update_classid(struct sock *sk)
1127 struct socket *sock,
1129 extern ssize_t sock_no_sendpage(struct socket *sock,
1138 extern int sock_common_getsockopt(struct socket *sock, int level, int optname,
1140 extern int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock,
1142 extern int sock_common_setsockopt(struct socket *sock, int level, int optname,
1144 extern int compat_sock_common_getsockopt(struct socket *sock, int level,
1146 extern int compat_sock_common_setsockopt(struct socket *sock, int level,
1149 extern void sk_common_release(struct sock *sk);
1156 extern void sock_init_data(struct socket *sock, struct sock *sk);
1173 static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp)
1181 static inline void sk_filter_charge(struct sock *sk, struct sk_filter *fp)
1213 static inline void sock_put(struct sock *sk)
1219 extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
1222 static inline void sk_tx_queue_set(struct sock *sk, int tx_queue)
1227 static inline void sk_tx_queue_clear(struct sock *sk)
1232 static inline int sk_tx_queue_get(const struct sock *sk)
1237 static inline void sk_set_socket(struct sock *sk, struct socket *sock)
1240 sk->sk_socket = sock;
1243 static inline wait_queue_head_t *sk_sleep(struct sock *sk)
1249 * Note that parent inode held reference count on this struct sock,
1254 static inline void sock_orphan(struct sock *sk)
1263 static inline void sock_graft(struct sock *sk, struct socket *parent)
1273 extern int sock_i_uid(struct sock *sk);
1274 extern unsigned long sock_i_ino(struct sock *sk);
1277 __sk_dst_get(struct sock *sk)
1285 sk_dst_get(struct sock *sk)
1297 extern void sk_reset_txq(struct sock *sk);
1299 static inline void dst_negative_advice(struct sock *sk)
1314 __sk_dst_set(struct sock *sk, struct dst_entry *dst)
1329 sk_dst_set(struct sock *sk, struct dst_entry *dst)
1337 __sk_dst_reset(struct sock *sk)
1343 sk_dst_reset(struct sock *sk)
1350 extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
1352 extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
1354 static inline int sk_can_gso(const struct sock *sk)
1359 extern void sk_setup_caps(struct sock *sk, struct dst_entry *dst);
1361 static inline void sk_nocaps_add(struct sock *sk, int flags)
1367 static inline int skb_copy_to_page(struct sock *sk, char __user *from,
1396 static inline int sk_wmem_alloc_get(const struct sock *sk)
1407 static inline int sk_rmem_alloc_get(const struct sock *sk)
1418 static inline int sk_has_allocations(const struct sock *sk)
1500 static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
1507 * is enough to guarantee sk_free() wont free this sock until
1513 static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
1522 extern void sk_reset_timer(struct sock *sk, struct timer_list* timer,
1525 extern void sk_stop_timer(struct sock *sk, struct timer_list* timer);
1527 extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
1529 extern int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb);
1535 static inline int sock_error(struct sock *sk)
1544 static inline unsigned long sock_wspace(struct sock *sk)
1556 static inline void sk_wake_async(struct sock *sk, int how, int band)
1565 static inline void sk_stream_moderate_sndbuf(struct sock *sk)
1573 struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp);
1575 static inline struct page *sk_stream_alloc_page(struct sock *sk)
1590 static inline int sock_writeable(const struct sock *sk)
1600 static inline long sock_rcvtimeo(const struct sock *sk, int noblock)
1605 static inline long sock_sndtimeo(const struct sock *sk, int noblock)
1610 static inline int sock_rcvlowat(const struct sock *sk, int waitall, int len)
1623 extern void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
1627 sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
1654 extern void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
1657 static inline void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
1683 struct sock *sk,
1697 static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
1706 static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
1714 struct net *sock_net(const struct sock *sk)
1720 void sock_net_set(struct sock *sk, struct net *net)
1731 static inline void sk_change_net(struct sock *sk, struct net *net)
1737 static inline struct sock *skb_steal_sock(struct sk_buff *skb)
1740 struct sock *sk = skb->sk;
1749 extern void sock_enable_timestamp(struct sock *sk, int flag);
1750 extern int sock_get_timestamp(struct sock *, struct timeval __user *);
1751 extern int sock_get_timestampns(struct sock *, struct timespec __user *);