Esempio n. 1
0
void openwsn_init() {
   // drivers
   openserial_init();
   
   // stack
   // cross-layer
   idmanager_init(); // call first since initializes e.g. EUI64
   openqueue_init();
   openrandom_init();
   opentimers_init();
   // 02a-TSCH
   ieee154e_init();
   // 02b-RES
   schedule_init();
   res_init();
   neighbors_init(); 
   nf_init(); //noise floor module
   // 03a-IPHC
   openbridge_init();
   iphc_init();
   // 03b-IPv6
   forwarding_init();
   icmpv6_init();
   icmpv6echo_init();
   icmpv6router_init();
   icmpv6rpl_init();
   // 04-TRAN
   opentcp_init();
   openudp_init();
   opencoap_init(); // initialize before any of the CoAP clients
   // 07-App
   //--CoAP
   //rwellknown_init();
   //rreg_init();
   //rinfo_init();
   //rleds_init();
   //rt_init();
   //rex_init();
   //rheli_init();
   //rrube_init();
   //rxl1_init();
   //layerdebug_init();
   //--UDP
   /*udpecho_init();
   udpinject_init();
   udpprint_init();*/
   //udprand_init();
   //udpstorm_init();
   //--TCP
   /*ohlone_init();
   tcpecho_init();
   tcpinject_init();
   tcpprint_init();*/
   //--misc
   //heli_init();
   //imu_init();
   
   //bbk_init();
   //hdl_init();
}
Esempio n. 2
0
void openstack_init(OpenMote* self) {
   
   //===== drivers
 openserial_init(self);
   
   //===== stack
   //-- cross-layer
 idmanager_init(self);    // call first since initializes EUI64 and isDAGroot
 openqueue_init(self);
 openrandom_init(self);
 opentimers_init(self);
   //-- 02a-TSCH
 adaptive_sync_init(self);
 ieee154e_init(self);
   //-- 02b-RES
 schedule_init(self);
 sixtop_init(self);
 neighbors_init(self);
   //-- 03a-IPHC
 openbridge_init(self);
 iphc_init(self);
   //-- 03b-IPv6
 forwarding_init(self);
 icmpv6_init(self);
 icmpv6echo_init(self);
 icmpv6rpl_init(self);
   //-- 04-TRAN
 opentcp_init(self);
 openudp_init(self);
 opencoap_init(self);     // initialize before any of the CoAP applications
   
   //===== applications
 openapps_init(self);
   
 openserial_printInfo(self, 
      COMPONENT_OPENWSN,ERR_BOOTED,
      (errorparameter_t)0,
      (errorparameter_t)0
   );
}
Esempio n. 3
0
static int __init inet6_init(void)
{
	struct sk_buff *dummy_skb;
	int err;

#ifdef MODULE
	if (!mod_member_present(&__this_module, can_unload))
	  return -EINVAL;

	__this_module.can_unload = &ipv6_unload;
#endif

	printk(KERN_INFO "IPv6 v0.8 for NET4.0\n");

	if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb))
	{
		printk(KERN_CRIT "inet6_proto_init: size fault\n");
		return -EINVAL;
	}

	/*
	 *	ipngwg API draft makes clear that the correct semantics
	 *	for TCP and UDP is to consider one TCP and UDP instance
	 *	in a host availiable by both INET and INET6 APIs and
	 *	able to communicate via both network protocols.
	 */

#if defined(MODULE) && defined(CONFIG_SYSCTL)
	ipv6_sysctl_register();
#endif
	err = icmpv6_init(&inet6_family_ops);
	if (err)
		goto icmp_fail;
	err = ndisc_init(&inet6_family_ops);
	if (err)
		goto ndisc_fail;
	err = igmp6_init(&inet6_family_ops);
	if (err)
		goto igmp_fail;
	/* Create /proc/foo6 entries. */
#ifdef CONFIG_PROC_FS
	err = -ENOMEM;
	if (!proc_net_create("raw6", 0, raw6_get_info))
		goto proc_raw6_fail;
	if (!proc_net_create("tcp6", 0, tcp6_get_info))
		goto proc_tcp6_fail;
	if (!proc_net_create("udp6", 0, udp6_get_info))
		goto proc_udp6_fail;
	if (!proc_net_create("sockstat6", 0, afinet6_get_info))
		goto proc_sockstat6_fail;
	if (!proc_net_create("snmp6", 0, afinet6_get_snmp))
		goto proc_snmp6_fail;
#endif
	ipv6_netdev_notif_init();
	ipv6_packet_init();
	ip6_route_init();
	ip6_flowlabel_init();
	addrconf_init();
	sit_init();

	/* Init v6 transport protocols. */
	udpv6_init();
	tcpv6_init();

	/* Now the userspace is allowed to create INET6 sockets. */
	(void) sock_register(&inet6_family_ops);
	
	return 0;

#ifdef CONFIG_PROC_FS
proc_snmp6_fail:
	proc_net_remove("sockstat6");
proc_sockstat6_fail:
	proc_net_remove("udp6");
proc_udp6_fail:
	proc_net_remove("tcp6");
proc_tcp6_fail:
        proc_net_remove("raw6");
proc_raw6_fail:
	igmp6_cleanup();
#endif
igmp_fail:
	ndisc_cleanup();
ndisc_fail:
	icmpv6_cleanup();
icmp_fail:
#if defined(MODULE) && defined(CONFIG_SYSCTL)
	ipv6_sysctl_unregister();
#endif
	return err;
}