+ struct vc_net_nx vc_net;
+ struct vc_net_flags vc_nf;
+
+ /* Create network context */
+ if (vc_net_create(ctx) == VC_NOCTX)
+ return -1;
+
+ /* Make the network context persistent */
+ vc_nf.mask = vc_nf.flagword = VC_NXF_PERSISTENT;
+ if (vc_set_nflags(ctx, &vc_nf))
+ return -1;
+
+ /* XXX: Allow access to all IPv4 addresses (for now) */
+ vc_net.type = vcNET_IPV4;
+ vc_net.count = 1;
+ vc_net.ip[0] = 0;
+ vc_net.mask[0] = 0;
+ if (vc_net_add(ctx, &vc_net) == -1)
+ return -1;