A clone of btpd with my configuration changes.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

44 lignes
1005 B

  1. #ifndef BTPD_NET_H
  2. #define BTPD_NET_H
  3. #define MSG_CHOKE 0
  4. #define MSG_UNCHOKE 1
  5. #define MSG_INTEREST 2
  6. #define MSG_UNINTEREST 3
  7. #define MSG_HAVE 4
  8. #define MSG_BITFIELD 5
  9. #define MSG_REQUEST 6
  10. #define MSG_PIECE 7
  11. #define MSG_CANCEL 8
  12. #define RATEHISTORY 20
  13. extern struct peer_tq net_unattached;
  14. extern struct peer_tq net_bw_readq;
  15. extern struct peer_tq net_bw_writeq;
  16. extern unsigned net_npeers;
  17. void net_init(void);
  18. void net_on_tick(void);
  19. void net_create(struct torrent *tp);
  20. void net_kill(struct torrent *tp);
  21. void net_start(struct torrent *tp);
  22. void net_stop(struct torrent *tp);
  23. int net_active(struct torrent *tp);
  24. void net_ban_peer(struct net *n, struct meta_peer *mp);
  25. int net_torrent_has_peer(struct net *n, const uint8_t *id);
  26. void net_io_cb(int sd, short type, void *arg);
  27. int net_connect_addr(int family, struct sockaddr *sa, socklen_t salen,
  28. int *sd);
  29. int net_connect_name(const char *ip, int port, int *sd);
  30. int net_af_spec(void);
  31. #endif