static int __init imq_init_module(void) { int err; if ((err = imq_init_devs())) { printk(KERN_ERR "IMQ: Error trying imq_init_devs()\n"); return err; } if ((err = imq_init_hooks())) { printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n"); imq_cleanup_devs(); return err; } printk(KERN_INFO "IMQ driver loaded successfully.\n"); #if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB) printk(KERN_INFO "\tHooking IMQ before NAT on PREROUTING.\n"); #else printk(KERN_INFO "\tHooking IMQ after NAT on PREROUTING.\n"); #endif #if defined(CONFIG_IMQ_BEHAVIOR_AB) || defined(CONFIG_IMQ_BEHAVIOR_BB) printk(KERN_INFO "\tHooking IMQ before NAT on POSTROUTING.\n"); #else printk(KERN_INFO "\tHooking IMQ after NAT on POSTROUTING.\n"); #endif return 0; }
static int __init imq_init_module(void) { int err; if ((err = imq_init_devs())) return err; if ((err = imq_init_hooks())) { imq_cleanup_devs(); return err; } printk(KERN_INFO "imq driver loaded.\n"); return 0; }
static int __init imq_init_module(void) { int err; #if defined(CONFIG_IMQ_NUM_DEVS) BUILD_BUG_ON(CONFIG_IMQ_NUM_DEVS > 16); BUILD_BUG_ON(CONFIG_IMQ_NUM_DEVS < 2); BUILD_BUG_ON(CONFIG_IMQ_NUM_DEVS - 1 > IMQ_F_IFMASK); #endif err = imq_init_devs(); if (err) { printk(KERN_ERR "IMQ: Error trying imq_init_devs(net)\n"); return err; } err = imq_init_hooks(); if (err) { printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n"); rtnl_link_unregister(&imq_link_ops); memset(imq_devs_cache, 0, sizeof(imq_devs_cache)); return err; } printk(KERN_INFO "IMQ driver loaded successfully. " "(numdevs = %d, numqueues = %d)\n", numdevs, numqueues); #if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB) printk(KERN_INFO "\tHooking IMQ before NAT on PREROUTING.\n"); #else printk(KERN_INFO "\tHooking IMQ after NAT on PREROUTING.\n"); #endif #if defined(CONFIG_IMQ_BEHAVIOR_AB) || defined(CONFIG_IMQ_BEHAVIOR_BB) printk(KERN_INFO "\tHooking IMQ before NAT on POSTROUTING.\n"); #else printk(KERN_INFO "\tHooking IMQ after NAT on POSTROUTING.\n"); #endif return 0; }