Exemplo n.º 1
0
static int u14_34f_detect(struct scsi_host_template *tpnt) {
    unsigned int j = 0, k;

    tpnt->proc_name = "u14-34f";

    if(strlen(boot_options)) option_setup(boot_options);

#if defined(MODULE)
    /* io_port could have been modified when loading as a module */
    if(io_port[0] != SKIP) {
        setup_done = TRUE;
        io_port[MAX_INT_PARAM] = 0;
    }
#endif

    for (k = 0; k < MAX_BOARDS + 1; k++) sh[k] = NULL;

    for (k = 0; io_port[k]; k++) {

        if (io_port[k] == SKIP) continue;

        if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt)) j++;
    }

    num_boards = j;
    return j;
}
Exemplo n.º 2
0
void dtls_dispatch::send_port_detect_nonce(std::shared_ptr<vnet_peer>& peer)
{
	port_detect_nonce nonce;
	dout() << "Sending port detect nonce " << std::hex << nonce.nonce0 << " " << nonce.nonce1 << std::dec << " to " << peer->conn->get_hashkey();
	port_nonce_map[nonce]=peer;
	timers.add(20, [this,nonce]() { port_nonce_map.erase(nonce); } );
	snow_port_detect port_detect(nonce.bytes());
	peer->get_conn().send(reinterpret_cast<uint8_t*>(&port_detect), sizeof(port_detect));
}