Changeset 123
- Timestamp:
- 03/16/07 21:26:07 (22 months ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
BUGS (modified) (1 diff)
-
lorcon.3 (modified) (1 diff)
-
mwnginject.c (modified) (2 diffs)
-
tx80211.c (modified) (1 diff)
-
tx80211.h (modified) (2 diffs)
-
tx80211_errno.h (modified) (1 diff)
-
tx80211_packet.h (modified) (1 diff)
-
wtinject.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BUGS
r111 r123 23 23 24 24 Solution: don't put dependencies in directory paths that include spaces. I use C:\DEV, you should too. 25 26 13-MAR-2007 - JWRIGHT 27 Formerly, you could say tx80211_init, tx80211_setchannel, tx80211_open, 28 tx80211_txpacket, tx80211_close. With the changes to the madwifing handling 29 code however, we create a new VAP during tx80211_open which changes the 30 interface name. As such, it is mandatory to call tx80211_init followed by 31 tx80211_open BEFORE tx80211_setfuncmode or tx80211_setchannel. -
trunk/lorcon.3
r104 r123 461 461 .BR tx80211_txpacket() 462 462 is used to transmit a packet, returning the number of bytes transmitted on 463 success. On error, -1 is returned if no bytes were transmitted; -2is returned463 success. On error, TX80211_ENOTX is returned if no bytes were transmitted; TX80211_EPARTTX is returned 464 464 if only a partial number of bytes were transmitted. 465 465 .I in_tx -
trunk/mwnginject.c
r122 r123 175 175 struct tx80211_radiotap_header *rtaphdr; 176 176 uint8_t *pkt; 177 int len, channel ;177 int len, channel, sendcount; 178 178 179 179 memset(&mwng_pkt, 0, sizeof(mwng_pkt)); … … 244 244 mwng_pkt.plen = len; 245 245 246 if (wtinj_send(in_tx, &mwng_pkt) != mwng_pkt.plen) { 247 free(pkt); 248 return -1; 249 } 250 246 if ( 247 sendcount = wtinj_send(in_tx, &mwng_pkt) != mwng_pkt.plen); 251 248 free(pkt); 252 return (mwng_pkt.plen - TX80211_RTAP_LEN); 249 250 if (sendcount < 0) { 251 return TX80211_ENOTX; 252 } else if (sendcount != mwng_pkt.plen) { 253 return TX80211_EPARTTX; 254 } else { 255 return (sendcount); 256 } 253 257 } 254 258 -
trunk/tx80211.c
r114 r123 452 452 } 453 453 454 void tx80211_initpacket(struct tx80211_packet *in_packet) { 454 void tx80211_initpacket(struct tx80211_packet *in_packet) 455 { 455 456 memset(in_packet, 0, sizeof(struct tx80211_packet)); 456 457 } 458 -
trunk/tx80211.h
r114 r123 84 84 int (*selfack_callthrough) (struct tx80211 *, uint8_t *); 85 85 }; 86 typedef struct tx80211 tx80211_t; 86 87 87 88 /* Dynamic structure of supported cards, for clients to list supported types */ … … 92 93 int num_cards; 93 94 }; 95 typedef struct tx80211_cardlist tx80211_cardlist_t; 94 96 95 97 -
trunk/tx80211_errno.h
r121 r123 55 55 #define TX80211_EOPENFAILED -19 56 56 57 /* Transmission, no bytes were transmitted. */ 58 #define TX80211_ENOTX -20 59 60 /* Transmission, partial byte count was transmitted */ 61 #define TX80211_EPARTTX -21 62 57 63 #endif -
trunk/tx80211_packet.h
r107 r123 87 87 int plen; 88 88 }; 89 typedef struct tx80211_packet tx80211_packet_t; 89 90 90 91 #endif -
trunk/wtinject.c
r121 r123 40 40 if (!(wtinj->raw_fd > 0)) { 41 41 /* file descriptor is not open */ 42 return 0;42 return TX80211_ENOTX; 43 43 } 44 44 … … 48 48 snprintf(wtinj->errstr, TX80211_STATUS_MAX, "write failed, %s", 49 49 strerror(errno)); 50 return -1;50 return TX80211_ENOTX;; 51 51 } 52 52 if (ret < (in_pkt->plen)) { 53 53 snprintf(wtinj->errstr, TX80211_STATUS_MAX, "incomplete write" 54 54 ", %s", strerror(errno)); 55 return -2;55 return ret; 56 56 } 57 57 return (ret);
