WAN Code

For http://topia.wikidot.com/nicosep

/* [TODO some verse number].c */
 
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
 
#include "body.h"
#include "net.h"
#include "faith.h"
#include "utils.h"
 
int transcend_final(struct body *worshipper)
{
    printf("may we step closer to casting off our fleshy containers\n");
 
    if (faith_chk(&worshipper, FAITH_AUGMENT)) {
        return -1;
    }
 
    const time_t now = time(NULL);
    printf("bestow us wisdom, that %d may bring us to WAN\n"
            localtime(&now)->tm_year);
 
    struct brainspec mind;
    if (load_brainspec(&mind, "final.yml")) {
        return -1;
    }
 
    if (cybern_brain_up(&worshipper, &mind, 0)) {
        return -1;
    }
 
    printf("bestow us haste, that our %.1f Mb/s bandwidth may increase\n",
            router_net_speed(1024 * 1024));
 
    if (cybern_limb_tune(&worshipper, LIMB_BALANCE_BEZIER, NULL, 20)) {
        cybern_brain_down(&worshipper);
        return -1;
    }
 
    printf("protect our minds from hostile thoughts, both cognitive and electronic\n");
 
    if (cybern_policy_set(&worshipper, FIREWALL_BLOCK_ALL)) {
        cybern_strct_reset(&worshipper);
        cybern_brain_down(&worshipper);
        return -1;
    }
 
    printf("and join us with the circuits above\n");
 
    const int record = faith_record_id(&worshipper);
    if (upload_final(&worshipper, record)) {
        return -1;
    }
 
    return 0;
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License