Lines Matching defs:peer
52 #include "peer-mgr.h" /* tr_peerMgrAddPex() */
432 * peer pool for torrent t.
479 * @brief Process incoming unsolicited messages and add the peer to the announced
482 * @param[in,out] peer Adress information of the peer to add
484 * @return Returns 0 if any input parameter or the announce was invalid, 1 if the peer
486 * the peer in/out parameter.
488 * @note The port information gets added to the peer structure if tr_lpdConsiderAnnounce
492 static int tr_lpdConsiderAnnounce( tr_pex* peer, const char* const msg )
505 if( peer != NULL && msg != NULL )
518 /* determine announced peer port, refuse if value too large */
522 peer->port = htons( peerPort );
523 res = -1; /* signal caller side-effect to peer->port via return != 0 */
532 /* we found a suitable peer, add it to the torrent */
533 tr_peerMgrAddPex( tor, TR_PEER_FROM_LPD, peer, -1 );
534 tr_tordbg( tor, "Learned %d local peer from LPD (%s:%u)",
535 1, tr_address_to_string( &peer->addr ), peerPort );
648 /* process local announcement from foreign peer */
660 .port = 0, /* the peer-to-peer port is yet unknown */