Lines Matching defs:conn
388 * conn -- PPPoE connection
396 sendPADT(PPPoEConnection *conn, char const *msg)
404 if (!conn->session) return;
407 if (conn->discoverySocket < 0) return;
409 memcpy(packet.ethHdr.h_dest, conn->peerEth, ETH_ALEN);
410 memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN);
416 packet.session = conn->session;
420 conn->session = 0;
423 if (conn->useHostUniq) {
447 if (conn->cookie.type) {
449 ntohs(conn->cookie.length) + TAG_HDR_SIZE);
450 memcpy(cursor, &conn->cookie, ntohs(conn->cookie.length) + TAG_HDR_SIZE);
451 cursor += ntohs(conn->cookie.length) + TAG_HDR_SIZE;
452 plen += ntohs(conn->cookie.length) + TAG_HDR_SIZE;
455 if (conn->relayId.type) {
457 ntohs(conn->relayId.length) + TAG_HDR_SIZE);
458 memcpy(cursor, &conn->relayId, ntohs(conn->relayId.length) + TAG_HDR_SIZE);
459 cursor += ntohs(conn->relayId.length) + TAG_HDR_SIZE;
460 plen += ntohs(conn->relayId.length) + TAG_HDR_SIZE;
464 sendPacket(conn, conn->discoverySocket, &packet, (int) (plen + HDR_SIZE));
465 if (conn->debugFile) {
466 dumpPacket(conn->debugFile, &packet, "SENT");
467 fprintf(conn->debugFile, "\n");
468 fflush(conn->debugFile);