Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ip_options.c File Reference

#include <linux/types.h>
#include <asm/uaccess.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/icmp.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
#include <net/sock.h>
#include <net/ip.h>
#include <net/icmp.h>

Include dependency graph for ip_options.c:

Go to the source code of this file.

Functions

void ip_options_build (struct sk_buff *skb, struct ip_options *opt, u32 daddr, struct rtable *rt, int is_frag)
int ip_options_echo (struct ip_options *dopt, struct sk_buff *skb)
void ip_options_fragment (struct sk_buff *skb)
int ip_options_compile (struct ip_options *opt, struct sk_buff *skb)
void ip_options_undo (struct ip_options *opt)
int ip_options_get (struct ip_options **optp, unsigned char *data, int optlen, int user)
void ip_forward_options (struct sk_buff *skb)
int ip_options_rcv_srr (struct sk_buff *skb)


Function Documentation

void ip_forward_options struct sk_buff skb  ) 
 

Definition at line 519 of file ip_options.c.

References sk_buff::dst, ip_rt_get_source(), ip_send_check(), IPCB, KERN_CRIT, memcmp, sk_buff::nh, printk, and rtable::rt_dst.

Referenced by ip_forward().

Here is the call graph for this function:

void ip_options_build struct sk_buff skb,
struct ip_options *  opt,
u32  daddr,
struct rtable rt,
int  is_frag
 

Definition at line 36 of file ip_options.c.

References do_gettimeofday(), htonl(), ip_rt_get_source(), IPCB, IPOPT_NOP, memcpy, memset, sk_buff::nh, timeval::tv_sec, and timeval::tv_usec.

Referenced by ip_build_and_send_pkt(), ip_build_xmit_slow(), and ip_queue_xmit().

Here is the call graph for this function:

int ip_options_compile struct ip_options *  opt,
struct sk_buff skb
 

Definition at line 245 of file ip_options.c.

References addr, CAP_NET_RAW, capable, do_gettimeofday(), sk_buff::dst, EINVAL, error, htonl(), ICMP_PARAMETERPROB, icmp_send(), inet_addr_type(), IPCB, IPOPT_END, IPOPT_LSRR, IPOPT_NOOP, IPOPT_RA, IPOPT_RR, IPOPT_SEC, IPOPT_SID, IPOPT_SSRR, IPOPT_TIMESTAMP, IPOPT_TS_PRESPEC, IPOPT_TS_TSANDADDR, IPOPT_TS_TSONLY, l, memcpy, memmove, memset, sk_buff::nh, NULL, overflow, rtable::rt_spec_dst, RTN_UNICAST, and u32.

Referenced by ip_options_get(), and ip_rcv().

Here is the call graph for this function:

int ip_options_echo struct ip_options *  dopt,
struct sk_buff skb
 

Definition at line 84 of file ip_options.c.

References addr, dptr, sk_buff::dst, EINVAL, inet_addr_type(), IPCB, IPOPT_END, IPOPT_TS_PRESPEC, memcmp, memcpy, memset, sk_buff::nh, RTN_LOCAL, start, and u32.

Referenced by icmp_reply(), icmp_send(), ip_cmsg_recv_retopts(), ip_send_reply(), and tcp_v4_save_options().

Here is the call graph for this function:

void ip_options_fragment struct sk_buff skb  ) 
 

Definition at line 207 of file ip_options.c.

References IPCB, IPOPT_COPIED, IPOPT_END, IPOPT_NOOP, l, memset, and sk_buff::nh.

Referenced by ip_fragment().

int ip_options_get struct ip_options **  optp,
unsigned char *  data,
int  optlen,
int  user
 

Definition at line 491 of file ip_options.c.

References copy_from_user, EFAULT, EINVAL, ENOMEM, ip_options_compile(), IPOPT_END, kfree_s(), kmalloc(), memcpy, memset, and NULL.

Referenced by ip_cmsg_send(), and ip_setsockopt().

Here is the call graph for this function:

int ip_options_rcv_srr struct sk_buff skb  ) 
 

Definition at line 564 of file ip_options.c.

References iphdr::daddr, sk_buff::dev, sk_buff::dst, EINVAL, htonl(), ICMP_PARAMETERPROB, icmp_send(), ip_route_input(), ip_rt_put(), IPCB, memcpy, sk_buff::nh, NULL, PACKET_HOST, sk_buff::pkt_type, rtable::rt_type, RTN_LOCAL, RTN_UNICAST, iphdr::saddr, iphdr::tos, rtable::u, and u32.

Referenced by ip_rcv().

Here is the call graph for this function:

void ip_options_undo struct ip_options *  opt  ) 
 

Definition at line 464 of file ip_options.c.

References IPOPT_TS_PRESPEC, memcpy, memmove, and memset.

Referenced by ip_cmsg_recv_retopts(), and ip_getsockopt().