Show
Ignore:
Timestamp:
08/24/07 21:57:38 (17 months ago)
Author:
aturner
Message:

fix comments. refs #176

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common/sendpacket.c

    r1893 r1897  
    167167 
    168168 
    169 /* 
     169/** 
    170170 * returns number of bytes sent on success or -1 on error 
    171171 * Note: it is theoretically possible to get a return code >0 and < len 
     
    267267} 
    268268 
    269  
     269/** 
     270 * Open the given network device name and returns a sendpacket_t struct 
     271 * pass the error buffer (in case there's a problem) and the direction 
     272 * that this interface represents 
     273 */ 
    270274sendpacket_t * 
    271275sendpacket_open(const char *device, char *errbuf, tcpr_dir_t direction) 
     
    292296} 
    293297 
    294  
     298/** 
     299 * Get packet stats for the given sendpacket_t 
     300 */ 
    295301char * 
    296302sendpacket_getstat(sendpacket_t *sp) 
     
    310316} 
    311317 
     318/** 
     319 * close the given sendpacket 
     320 */ 
    312321int 
    313322sendpacket_close(sendpacket_t *sp) 
     
    319328} 
    320329 
    321 /* 
     330/** 
    322331 * returns the Layer 2 address of the interface current  
    323332 * open.  on error, return NULL 
     
    345354} 
    346355 
    347 /* 
     356/** 
    348357 * returns the error string 
    349358 */ 
     
    355364} 
    356365 
    357 /* 
     366/** 
    358367 * Set's the error string 
    359368 */ 
     
    375384 
    376385#if defined HAVE_PCAP_INJECT || defined HAVE_PCAP_SENDPACKET 
     386/** 
     387 * Inner sendpacket_open() method for using libpcap 
     388 */ 
    377389static sendpacket_t * 
    378390sendpacket_open_pcap(const char *device, char *errbuf) 
     
    407419} 
    408420 
     421/** 
     422 * Get the hardware MAC address for the given interface using libpcap 
     423 */ 
    409424static struct tcpr_ether_addr * 
    410425sendpacket_get_hwaddr_pcap(sendpacket_t *sp) 
     
    417432 
    418433#if defined HAVE_LIBNET 
     434/** 
     435 * Inner sendpacket_open() method for using libnet 
     436 */ 
    419437static sendpacket_t *  
    420438sendpacket_open_libnet(const char *device, char *errbuf) 
     
    437455} 
    438456 
     457/** 
     458 * Get the hardware MAC address for the given interface using libnet 
     459 */ 
    439460static struct tcpr_ether_addr * 
    440461sendpacket_get_hwaddr_libnet(sendpacket_t *sp) 
     
    456477 
    457478#if defined HAVE_PF_PACKET 
     479/** 
     480 * Inner sendpacket_open() method for using Linux's PF_PACKET 
     481 */ 
    458482static sendpacket_t * 
    459483sendpacket_open_pf(const char *device, char *errbuf) 
     
    555579} 
    556580 
    557 /* get the interface index (necessary for sending packets w/ PF_PACKET) */ 
     581/**  
     582 * get the interface index (necessary for sending packets w/ PF_PACKET)  
     583 */ 
    558584static int 
    559585get_iface_index(int fd, const int8_t *device, char *errbuf) { 
     
    571597}               
    572598 
    573 /* 
    574  * get's the hardware address via Linux's PF packet 
    575  * interface 
     599/** 
     600 * get's the hardware address via Linux's PF packet interface 
    576601 */ 
    577602struct tcpr_ether_addr * 
     
    611636 
    612637#if defined HAVE_BPF 
     638/** 
     639 * Inner sendpacket_open() method for using BSD's BPF interface 
     640 */ 
    613641static sendpacket_t * 
    614642sendpacket_open_bpf(const char *device, char *errbuf) 
     
    726754} 
    727755 
     756/** 
     757 * Get the interface hardware MAC address when using BPF 
     758 */ 
    728759struct tcpr_ether_addr * 
    729760sendpacket_get_hwaddr_bpf(sendpacket_t *sp) 
     
    774805#endif /* HAVE_BPF */ 
    775806 
    776 /* 
     807/** 
     808 * Get the DLT type of the opened sendpacket 
    777809 * Return -1 if we can't figure it out, else return the DLT_ value 
    778810 */