string: factorize skip_spaces and export it to be generally available
[safe/jmp/linux-2.6] / include / linux / mroute.h
index 08bc776..c5f3d53 100644 (file)
@@ -59,20 +59,24 @@ struct vifctl {
        unsigned char vifc_flags;       /* VIFF_ flags */
        unsigned char vifc_threshold;   /* ttl limit */
        unsigned int vifc_rate_limit;   /* Rate limiter values (NI) */
-       struct in_addr vifc_lcl_addr;   /* Our address */
+       union {
+               struct in_addr vifc_lcl_addr;     /* Local interface address */
+               int            vifc_lcl_ifindex;  /* Local interface index   */
+       };
        struct in_addr vifc_rmt_addr;   /* IPIP tunnel addr */
 };
 
-#define VIFF_TUNNEL    0x1     /* IPIP tunnel */
-#define VIFF_SRCRT     0x2     /* NI */
-#define VIFF_REGISTER  0x4     /* register vif */
+#define VIFF_TUNNEL            0x1     /* IPIP tunnel */
+#define VIFF_SRCRT             0x2     /* NI */
+#define VIFF_REGISTER          0x4     /* register vif */
+#define VIFF_USE_IFINDEX       0x8     /* use vifc_lcl_ifindex instead of
+                                          vifc_lcl_addr to find an interface */
 
 /*
  *     Cache manipulation structures for mrouted and PIMd
  */
  
-struct mfcctl
-{
+struct mfcctl {
        struct in_addr mfcc_origin;             /* Origin of mcast      */
        struct in_addr mfcc_mcastgrp;           /* Group in question    */
        vifi_t  mfcc_parent;                    /* Where it arrived     */
@@ -87,8 +91,7 @@ struct mfcctl
  *     Group count retrieval for mrouted
  */
  
-struct sioc_sg_req
-{
+struct sioc_sg_req {
        struct in_addr src;
        struct in_addr grp;
        unsigned long pktcnt;
@@ -100,8 +103,7 @@ struct sioc_sg_req
  *     To get vif packet counts
  */
 
-struct sioc_vif_req
-{
+struct sioc_vif_req {
        vifi_t  vifi;           /* Which iface */
        unsigned long icount;   /* In packets */
        unsigned long ocount;   /* Out packets */
@@ -114,8 +116,7 @@ struct sioc_vif_req
  *     data. Magically happens to be like an IP packet as per the original
  */
  
-struct igmpmsg
-{
+struct igmpmsg {
        __u32 unused1,unused2;
        unsigned char im_msgtype;               /* What is this */
        unsigned char im_mbz;                   /* Must be zero */
@@ -176,8 +177,7 @@ static inline int ip_mr_init(void)
 }
 #endif
 
-struct vif_device
-{
+struct vif_device {
        struct net_device       *dev;                   /* Device we are using */
        unsigned long   bytes_in,bytes_out;
        unsigned long   pkt_in,pkt_out;         /* Statistics                   */
@@ -190,8 +190,7 @@ struct vif_device
 
 #define VIFF_STATIC 0x8000
 
-struct mfc_cache 
-{
+struct mfc_cache {
        struct mfc_cache *next;                 /* Next entry on cache line     */
 #ifdef CONFIG_NET_NS
        struct net *mfc_net;