udp.c (19c7578fb22b0aef103222cae9b522f03ae489d6) udp.c (cb61cb9b8b5ef6c2697d84e5015e314626eb2fba)
1/*
2 * UDP over IPv6
3 * Linux INET6 implementation
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 *
8 * Based on linux/ipv4/udp.c

--- 283 unchanged lines hidden (view full) ---

292
293 if (sk->sk_filter) {
294 if (udp_lib_checksum_complete(skb))
295 goto drop;
296 }
297
298 if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) {
299 /* Note that an ENOMEM error is charged twice */
1/*
2 * UDP over IPv6
3 * Linux INET6 implementation
4 *
5 * Authors:
6 * Pedro Roque <roque@di.fc.ul.pt>
7 *
8 * Based on linux/ipv4/udp.c

--- 283 unchanged lines hidden (view full) ---

292
293 if (sk->sk_filter) {
294 if (udp_lib_checksum_complete(skb))
295 goto drop;
296 }
297
298 if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) {
299 /* Note that an ENOMEM error is charged twice */
300 if (rc == -ENOMEM)
300 if (rc == -ENOMEM) {
301 UDP6_INC_STATS_BH(UDP_MIB_RCVBUFERRORS, is_udplite);
301 UDP6_INC_STATS_BH(UDP_MIB_RCVBUFERRORS, is_udplite);
302 atomic_inc(&sk->sk_drops);
303 }
302 goto drop;
303 }
304
305 return 0;
306drop:
307 UDP6_INC_STATS_BH(UDP_MIB_INERRORS, is_udplite);
308 kfree_skb(skb);
309 return -1;

--- 640 unchanged lines hidden (view full) ---

950 __u16 destp, srcp;
951
952 dest = &np->daddr;
953 src = &np->rcv_saddr;
954 destp = ntohs(inet->dport);
955 srcp = ntohs(inet->sport);
956 seq_printf(seq,
957 "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
304 goto drop;
305 }
306
307 return 0;
308drop:
309 UDP6_INC_STATS_BH(UDP_MIB_INERRORS, is_udplite);
310 kfree_skb(skb);
311 return -1;

--- 640 unchanged lines hidden (view full) ---

952 __u16 destp, srcp;
953
954 dest = &np->daddr;
955 src = &np->rcv_saddr;
956 destp = ntohs(inet->dport);
957 srcp = ntohs(inet->sport);
958 seq_printf(seq,
959 "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
958 "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p\n",
960 "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d\n",
959 bucket,
960 src->s6_addr32[0], src->s6_addr32[1],
961 src->s6_addr32[2], src->s6_addr32[3], srcp,
962 dest->s6_addr32[0], dest->s6_addr32[1],
963 dest->s6_addr32[2], dest->s6_addr32[3], destp,
964 sp->sk_state,
965 atomic_read(&sp->sk_wmem_alloc),
966 atomic_read(&sp->sk_rmem_alloc),
967 0, 0L, 0,
968 sock_i_uid(sp), 0,
969 sock_i_ino(sp),
961 bucket,
962 src->s6_addr32[0], src->s6_addr32[1],
963 src->s6_addr32[2], src->s6_addr32[3], srcp,
964 dest->s6_addr32[0], dest->s6_addr32[1],
965 dest->s6_addr32[2], dest->s6_addr32[3], destp,
966 sp->sk_state,
967 atomic_read(&sp->sk_wmem_alloc),
968 atomic_read(&sp->sk_rmem_alloc),
969 0, 0L, 0,
970 sock_i_uid(sp), 0,
971 sock_i_ino(sp),
970 atomic_read(&sp->sk_refcnt), sp);
972 atomic_read(&sp->sk_refcnt), sp,
973 atomic_read(&sp->sk_drops));
971}
972
973int udp6_seq_show(struct seq_file *seq, void *v)
974{
975 if (v == SEQ_START_TOKEN)
976 seq_printf(seq,
977 " sl "
978 "local_address "
979 "remote_address "
980 "st tx_queue rx_queue tr tm->when retrnsmt"
974}
975
976int udp6_seq_show(struct seq_file *seq, void *v)
977{
978 if (v == SEQ_START_TOKEN)
979 seq_printf(seq,
980 " sl "
981 "local_address "
982 "remote_address "
983 "st tx_queue rx_queue tr tm->when retrnsmt"
981 " uid timeout inode\n");
984 " uid timeout inode ref pointer drops\n");
982 else
983 udp6_sock_seq_show(seq, v, ((struct udp_iter_state *)seq->private)->bucket);
984 return 0;
985}
986
987static struct udp_seq_afinfo udp6_seq_afinfo = {
988 .name = "udp6",
989 .family = AF_INET6,

--- 84 unchanged lines hidden ---
985 else
986 udp6_sock_seq_show(seq, v, ((struct udp_iter_state *)seq->private)->bucket);
987 return 0;
988}
989
990static struct udp_seq_afinfo udp6_seq_afinfo = {
991 .name = "udp6",
992 .family = AF_INET6,

--- 84 unchanged lines hidden ---