- Timestamp:
- 03/01/15 19:22:39 (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-gbox-cards.c
r10593 r10608 277 277 } 278 278 279 void gbox_delete_cards_with_id(uint16_t peer_id) 280 { 281 struct gbox_card *card; 282 283 cs_writelock(&gbox_cards_lock); 284 LL_ITER it = ll_iter_create(gbox_cards); 285 while((card = ll_iter_next(&it))) 286 { 287 if (card->id.peer == peer_id) 288 { 289 ll_iter_remove(&it); 290 ll_append(gbox_backup_cards, card); 291 } 292 } 293 cs_writeunlock(&gbox_cards_lock); 294 295 return; 296 } 297 279 298 void gbox_delete_cards_from_type(uint8_t type) 280 299 { … … 318 337 } 319 338 320 void gbox_send_hello(struct s_client *cli) 321 { 322 struct gbox_peer *peer = cli->gbox; 339 void gbox_send_hello(struct s_client *proxy, uint8_t hello_stat) 340 { 341 if (!proxy) 342 { 343 cs_log("Invalid call to gbox_send_hello with proxy"); 344 return; 345 } 323 346 324 347 uint16_t nbcards = 0; … … 328 351 packet = 0; 329 352 uchar *ptr = buf + 11; 330 if(ll_count(gbox_cards) != 0 && peer->hello_stat > GBOX_STAT_HELLOL) 331 { 353 if(ll_count(gbox_cards) != 0 && hello_stat > GBOX_STAT_HELLOL) 354 { 355 struct gbox_peer *peer = proxy->gbox; 356 if (!peer || !peer->my_user || !peer->my_user->account) 357 { 358 cs_log("Invalid call to gbox_send_hello with peer"); 359 return; 360 } 332 361 memset(buf, 0, sizeof(buf)); 333 362 … … 355 384 if(nbcards == 100) //check if 100 is good or we need more sophisticated algorithm 356 385 { 357 //NEEDFIX: Try to get rid of send hello in cards function358 gbox_send_hello_packet( cli, packet, buf, ptr, nbcards);386 //NEEDFIX: Try to get rid of send hello in cards function 387 gbox_send_hello_packet(proxy, packet, buf, ptr, nbcards, hello_stat); 359 388 packet++; 360 389 nbcards = 0; … … 366 395 cs_readunlock(&gbox_cards_lock); 367 396 } // end if local card exists 368 369 397 //last packet has bit 0x80 set 370 gbox_send_hello_packet( cli, 0x80 | packet, buf, ptr, nbcards);398 gbox_send_hello_packet(proxy, 0x80 | packet, buf, ptr, nbcards, hello_stat); 371 399 372 400 return; -
trunk/module-gbox-cards.h
r10570 r10608 10 10 uint16_t gbox_count_peer_cards(uint16_t peer_id); 11 11 void gbox_delete_cards_from_peer(uint16_t peer_id); 12 void gbox_delete_cards_with_id(uint16_t peer_id); 12 13 void gbox_delete_cards_from_type(uint8_t type); 13 14 void gbox_free_cardlist(void); 14 void gbox_send_hello(struct s_client * cli);15 void gbox_send_hello(struct s_client *proxy, uint8_t hello_stat); 15 16 void gbox_add_good_sid(uint16_t id_card, uint16_t caid, uint8_t slot, uint16_t sid_ok, uint32_t cw_time); 16 17 void gbox_remove_bad_sid(uint16_t id_peer, uint8_t id_slot, uint16_t sid); -
trunk/module-gbox.c
r10595 r10608 35 35 36 36 static void gbox_send_checkcode(struct s_client *cli); 37 static void gbox_local_cards(struct s_client *cli); 38 static void gbox_init_ecm_request_ext(struct gbox_ecm_request_ext *ere); 39 static int32_t gbox_client_init(struct s_client *cli); 40 static int8_t gbox_check_header(struct s_client *cli, struct s_client *proxy, uchar *data, int32_t l); 37 static void gbox_local_cards(struct s_reader *reader, TUNTAB *ttab); 41 38 static int8_t gbox_incoming_ecm(struct s_client *cli, uchar *data, int32_t n); 42 39 static int8_t gbox_cw_received(struct s_client *cli, uchar *data, int32_t n); 43 40 static int32_t gbox_recv_chk(struct s_client *cli, uchar *dcw, int32_t *rc, uchar *data, int32_t n); 44 41 static int32_t gbox_checkcode_recv(struct s_client *cli, uchar *checkcode); 45 static uint16_t gbox_convert_password_to_id(uint32_t password);46 42 static int32_t gbox_send_ecm(struct s_client *cli, ECM_REQUEST *er, uchar *UNUSED(buf)); 47 43 … … 150 146 return; 151 147 } 148 cs_readlock(&clientlist_lock); 152 149 struct s_client *cl; 153 150 for(cl = first_client; cl; cl = cl->next) … … 162 159 } 163 160 } 161 cs_readunlock(&clientlist_lock); 164 162 fclose(fhandle); 165 163 return; … … 206 204 void gbox_init_ecm_request_ext(struct gbox_ecm_request_ext *ere) 207 205 { 208 /*209 ere->gbox_crc = 0;210 ere->gbox_ecm_id = 0;211 ere->gbox_ecm_ok = 0;212 */213 206 ere->gbox_hops = 0; 214 207 ere->gbox_peer = 0; 215 208 ere->gbox_mypeer = 0; 216 ere->gbox_caid = 0;217 ere->gbox_prid = 0;218 209 ere->gbox_slot = 0; 219 210 ere->gbox_version = 0; … … 225 216 { 226 217 struct s_client *cl; 218 struct s_client *found = NULL; 219 cs_readlock(&clientlist_lock); 227 220 for(cl = first_client; cl; cl = cl->next) 228 221 { 229 222 if(cl->typ == 'p' && cl->gbox && cl->gbox_peer_id == gbox_id) 230 { return cl; } 231 } 232 return NULL; 233 } 234 235 // if input client is typ proxy get client and vice versa 236 struct s_client *switch_client_proxy(struct s_client *cli, uint16_t gbox_id) 237 { 238 if (!cli) { return cli; } 239 240 struct s_client *cl; 241 int8_t typ; 242 if(cli->typ == 'c') 243 { typ = 'p'; } 244 else 245 { typ = 'c'; } 246 for(cl = first_client; cl; cl = cl->next) 247 { 248 if(cl->typ == typ && cl->gbox && cl->gbox_peer_id == gbox_id) 249 { return cl; } 250 } 251 return cli; 223 { 224 found = cl; 225 break; 226 } 227 } 228 cs_readunlock(&clientlist_lock); 229 return found; 252 230 } 253 231 254 232 static int8_t gbox_reinit_peer(struct gbox_peer *peer) 255 233 { 256 if (!peer) 257 { return -1; } 234 if (!peer) { return -1; } 258 235 NULLFREE(peer->hostname); 259 236 peer->online = 0; 260 237 peer->ecm_idx = 0; 261 peer->hello_stat = GBOX_STAT_HELLOL; 262 peer->next_hello = 0; 238 peer->next_hello = 0; 263 239 gbox_delete_cards_from_peer(peer->gbox.id); 264 240 // peer->my_user = NULL; … … 284 260 { 285 261 struct s_client *cl; 262 cs_readlock(&clientlist_lock); 286 263 for(cl = first_client; cl; cl = cl->next) 287 264 { … … 293 270 hostname2ip(cl->reader->device, &(cl->ip)); 294 271 gbox_reinit_proxy(cl); 295 gbox_send_hello(cl); 296 } 297 } 272 gbox_send_hello(cl, GBOX_STAT_HELLOL); 273 } 274 } 275 cs_readunlock(&clientlist_lock); 298 276 } 299 277 … … 320 298 { 321 299 struct s_client *cl; 300 cs_writelock(&clientlist_lock); 322 301 for(cl = first_client; cl; cl = cl->next) 323 302 { … … 328 307 } 329 308 } 309 cs_writeunlock(&clientlist_lock); 330 310 return 0; 331 311 } … … 336 316 337 317 uint16_t gbox_id = gbox_convert_password_to_id(gbox_password); 338 struct s_client *cl = switch_client_proxy(cli,gbox_id);318 struct s_client *cl = get_gbox_proxy(gbox_id); 339 319 340 320 if(cl->typ == 'p' && cl->gbox && cl->reader) … … 354 334 cli->grp = account->grp; 355 335 cli->lastecm = time(NULL); 336 peer->my_user = cli; 356 337 return 0; 357 338 } … … 446 427 ,username(cli), cli->reader->device, peer->next_hello, data[11] & 0xf); 447 428 peer->next_hello = 0; 448 peer->hello_stat = GBOX_STAT_HELLOL; 449 gbox_send_hello(cli); 429 gbox_send_hello(cli, GBOX_STAT_HELLOL); 450 430 return 0; 451 431 } … … 494 474 else //last packet of Hello 495 475 { 496 peer->online = 1;497 476 peer->filtered_cards = gbox_count_peer_cards(peer->gbox.id); 498 477 if(!data[0xA]) 499 478 { 500 479 cs_log("-> HelloS in %d packets from %s (%s:%d) V2.%02X with %d cards filtered to %d cards", (data[0x0B] & 0x0f)+1, cli->reader->label, cs_inet_ntoa(cli->ip), cli->reader->r_port, peer->gbox.minor_version, peer->total_cards, peer->filtered_cards); 501 peer->hello_stat = GBOX_STAT_HELLOR; 502 gbox_send_hello(cli); 480 gbox_send_hello(cli, GBOX_STAT_HELLOR); 503 481 } 504 482 else … … 507 485 gbox_send_checkcode(cli); 508 486 } 509 if(peer->hello_stat == GBOX_STAT_HELLOS) 510 { gbox_send_hello(cli); } 487 if(!peer->online) 488 { gbox_send_hello(cli, GBOX_STAT_HELLOS); } 489 peer->online = 1; 511 490 cli->reader->tcp_connected = 2; //we have card 512 491 if(!peer->filtered_cards) … … 601 580 ere->gbox_unknown = ecm[er->ecmlen + 3]; 602 581 ere->gbox_type = ecm[er->ecmlen + 4]; 603 ere->gbox_caid = b2i(2, ecm + er->ecmlen + 5); 604 ere->gbox_prid = b2i(2, ecm + er->ecmlen + 7); 582 uint32_t caprovid = b2i(4, ecm + er->ecmlen + 5); 605 583 ere->gbox_mypeer = b2i(2, ecm + er->ecmlen + 10); 606 584 ere->gbox_slot = ecm[er->ecmlen + 12]; … … 612 590 memcpy(&ere->gbox_routing_info[0], &data[n - 15 - ere->gbox_hops + 1], ere->gbox_hops - 1); 613 591 614 er->prid = chk_provid(er->ecm, er->caid); 592 er->caid = gbox_get_caid(caprovid); 593 er->prid = gbox_get_provid(caprovid); 615 594 cs_log_dbg(D_READER, "<- ECM (distance: %d) from %04X via peer (%s:%d) for SID %04X", ere->gbox_hops, ere->gbox_peer, peer->hostname, cli->port, er->srvid); 616 595 get_cw(cl, er); … … 633 612 { 634 613 case MSG_BOXINFO: 635 gbox_send_hello(proxy );614 gbox_send_hello(proxy, GBOX_STAT_HELLOR); 636 615 break; 637 616 case MSG_GOODBYE: … … 723 702 static int8_t gbox_check_header(struct s_client *cli, struct s_client *proxy, uchar *data, int32_t l) 724 703 { 725 struct gbox_peer *peer = NULL; 726 727 if (proxy) 728 { peer = proxy->gbox; } 704 struct gbox_peer *peer = NULL; 705 if (proxy) { peer = proxy->gbox; } 729 706 730 707 char tmp[0x50]; … … 757 734 } 758 735 authentication_done = 1; 759 gbox_local_cards(cli);760 736 proxy = get_gbox_proxy(cli->gbox_peer_id); 761 if (proxy) { peer = proxy->gbox; }762 if (peer) { peer->my_user = cli; }737 gbox_local_cards(proxy->reader, &cli->ttab); 738 peer = proxy->gbox; 763 739 } 764 740 if (!peer) { return -1; } … … 835 811 } 836 812 837 void gbox_send_hello_packet(struct s_client *cli, int8_t number, uchar *outbuf, uchar *ptr, int32_t nbcards )813 void gbox_send_hello_packet(struct s_client *cli, int8_t number, uchar *outbuf, uchar *ptr, int32_t nbcards, uint8_t hello_stat) 838 814 { 839 815 struct gbox_peer *peer = cli->gbox; … … 842 818 gbox_message_header(outbuf, MSG_HELLO, peer->gbox.password, local_gbox.password); 843 819 // initial HELLO = 0, subsequent = 1 844 if( peer->hello_stat > GBOX_STAT_HELLOS)820 if(hello_stat > GBOX_STAT_HELLOS) 845 821 { outbuf[10] = 1; } 846 822 else … … 851 827 { 852 828 gbox_calc_checkcode(&local_gbox.checkcode[0]); 853 if( peer->hello_stat != GBOX_STAT_HELLOL)829 if(hello_stat != GBOX_STAT_HELLOL) 854 830 { memcpy(++ptr, local_gbox.checkcode, 7); } 855 831 else … … 863 839 } 864 840 len = ptr - outbuf + 1; 865 switch( peer->hello_stat)841 switch(hello_stat) 866 842 { 867 843 case GBOX_STAT_HELLOL: 868 844 cs_log("<- HelloL to %s", cli->reader->label); 869 if((number & 0x80) == 0x80)870 { peer->hello_stat = GBOX_STAT_HELLOS; }871 845 break; 872 846 case GBOX_STAT_HELLOS: 873 847 cs_log("<- HelloS total cards %d to %s", nbcards, cli->reader->label); 874 if((number & 0x80) == 0x80)875 { peer->hello_stat = GBOX_STAT_HELLO3; }876 848 break; 877 849 case GBOX_STAT_HELLOR: 878 850 cs_log("<- HelloR total cards %d to %s", nbcards, cli->reader->label); 879 if((number & 0x80) == 0x80)880 { peer->hello_stat = GBOX_STAT_HELLO3; }881 851 break; 882 852 default: … … 932 902 933 903 memcpy(&data[0], buf, n); 904 934 905 ret = gbox_check_header(cli, proxy, &data[0], n); 935 if (ret < 0) 936 { return -1; } 906 if (ret < 0) { return -1; } 937 907 938 908 //in case of new authentication the proxy gbox can now be found 939 if (ret) 940 { proxy = get_gbox_proxy(cli->gbox_peer_id); } 941 942 if (!proxy) 943 { return -1; } 909 if (ret) { proxy = get_gbox_proxy(cli->gbox_peer_id); } 910 911 if (!proxy) { return -1; } 944 912 945 913 cli->last = time((time_t *)0); … … 964 932 if (!cl || !er) { return; } 965 933 966 struct s_client *cli = switch_client_proxy(cl,cl->gbox_peer_id);967 if (!cli ->gbox) { return; }934 struct s_client *cli = get_gbox_proxy(cl->gbox_peer_id); 935 if (!cli || !cli->gbox) { return; } 968 936 struct gbox_peer *peer = cli->gbox; 969 937 … … 984 952 i2b_buf(2, ere->gbox_mypeer, buf + 10); //From peer 985 953 buf[12] = (ere->gbox_slot << 4) | (er->ecm[0] & 0x0f); //slot << 4 | even/odd 986 buf[13] = er e->gbox_caid >> 8; //CAID first byte954 buf[13] = er->caid >> 8; //CAID first byte 987 955 memcpy(buf + 14, er->cw, 16); //CW 988 956 i2b_buf(4, er->gbox_crc, buf + 30); //CRC 989 i2b_buf(2, er e->gbox_caid, buf + 34);//CAID957 i2b_buf(2, er->caid, buf + 34); //CAID 990 958 buf[36] = ere->gbox_slot; //Slot 991 959 if (buf[34] == 0x06) //if irdeto … … 1025 993 } 1026 994 1027 static void gbox_local_cards(struct s_ client *cli)995 static void gbox_local_cards(struct s_reader *reader, TUNTAB *ttab) 1028 996 { 1029 997 int32_t i; … … 1040 1008 uint8_t min_reshare = 0; 1041 1009 gbox_delete_cards_from_type(GBOX_CARD_TYPE_CCCAM); 1042 #endif 1043 1044 gbox_delete_cards_from_peer(local_gbox.id); 1010 #endif 1011 gbox_delete_cards_with_id(local_gbox.id); 1045 1012 struct s_client *cl; 1013 cs_readlock(&clientlist_lock); 1046 1014 for(cl = first_client; cl; cl = cl->next) 1047 1015 { … … 1056 1024 prid = cl->reader->prid[i][1] << 16 | 1057 1025 cl->reader->prid[i][2] << 8 | cl->reader->prid[i][3]; 1058 gbox_add_card(local_gbox.id, gbox_get_caprovid(cl->reader->caid, prid), slot, cli->reader->gbox_reshare, 0, GBOX_CARD_TYPE_LOCAL, NULL);1026 gbox_add_card(local_gbox.id, gbox_get_caprovid(cl->reader->caid, prid), slot, reader->gbox_reshare, 0, GBOX_CARD_TYPE_LOCAL, NULL); 1059 1027 } 1060 1028 } 1061 1029 else 1062 1030 { 1063 gbox_add_card(local_gbox.id, gbox_get_caprovid(cl->reader->caid, 0), slot, cli->reader->gbox_reshare, 0, GBOX_CARD_TYPE_LOCAL, NULL);1031 gbox_add_card(local_gbox.id, gbox_get_caprovid(cl->reader->caid, 0), slot, reader->gbox_reshare, 0, GBOX_CARD_TYPE_LOCAL, NULL); 1064 1032 1065 1033 //Check for Betatunnel on gbox account in oscam.user 1066 if (chk_is_betatunnel_caid(cl->reader->caid) == 1 && cli->ttab.ttdata && cl->reader->caid == cli->ttab.ttdata[0].bt_caidto)1034 if (chk_is_betatunnel_caid(cl->reader->caid) == 1 && ttab->ttdata && cl->reader->caid == ttab->ttdata[0].bt_caidto) 1067 1035 { 1068 1036 //For now only first entry in tunnel tab. No sense in iteration? 1069 1037 //Add betatunnel card to transmitted list 1070 gbox_add_card(local_gbox.id, gbox_get_caprovid( cli->ttab.ttdata[0].bt_caidfrom, 0), slot, cli->reader->gbox_reshare, 0, GBOX_CARD_TYPE_BETUN, NULL);1071 cs_log_dbg(D_READER, "gbox created betatunnel card for caid: %04X->%04X", cli->ttab.ttdata[0].bt_caidfrom,cl->reader->caid);1038 gbox_add_card(local_gbox.id, gbox_get_caprovid(ttab->ttdata[0].bt_caidfrom, 0), slot, reader->gbox_reshare, 0, GBOX_CARD_TYPE_BETUN, NULL); 1039 cs_log_dbg(D_READER, "gbox created betatunnel card for caid: %04X->%04X", ttab->ttdata[0].bt_caidfrom, cl->reader->caid); 1072 1040 } 1073 1041 } 1074 1042 } //end local readers 1075 1043 #ifdef MODULE_CCCAM 1076 if((cfg.cc_reshare > -1) && ( cli->reader->gbox_cccam_reshare) && cl->typ == 'p' && cl->reader && cl->reader->typ == R_CCCAM && cl->cc)1044 if((cfg.cc_reshare > -1) && (reader->gbox_cccam_reshare) && cl->typ == 'p' && cl->reader && cl->reader->typ == R_CCCAM && cl->cc) 1077 1045 { 1078 1046 cc = cl->cc; … … 1093 1061 { min_reshare = card->reshare; } 1094 1062 min_reshare++; //strange CCCam logic. 0 means direct peers 1095 if ( cli->reader->gbox_cccam_reshare < min_reshare)1096 { min_reshare = cli->reader->gbox_cccam_reshare; }1063 if (reader->gbox_cccam_reshare < min_reshare) 1064 { min_reshare = reader->gbox_cccam_reshare; } 1097 1065 if(caid_is_seca(card->caid) || caid_is_viaccess(card->caid) || caid_is_cryptoworks(card->caid)) 1098 1066 { … … 1107 1075 #endif 1108 1076 } //end for clients 1077 cs_readunlock(&clientlist_lock); 1109 1078 1110 1079 if (cfg.gbox_proxy_cards_num > 0) … … 1113 1082 { 1114 1083 slot = gbox_next_free_slot(local_gbox.id); 1115 gbox_add_card(local_gbox.id, cfg.gbox_proxy_card[i], slot, cli->reader->gbox_reshare, 0, GBOX_CARD_TYPE_PROXY, NULL);1084 gbox_add_card(local_gbox.id, cfg.gbox_proxy_card[i], slot, reader->gbox_reshare, 0, GBOX_CARD_TYPE_PROXY, NULL); 1116 1085 if ((cfg.gbox_proxy_card[i] >> 24) == 0x05) 1117 1086 { … … 1149 1118 struct s_client *proxy; 1150 1119 if(cli->typ != 'p') 1151 { proxy = switch_client_proxy(cli,cli->gbox_peer_id); }1120 { proxy = get_gbox_proxy(cli->gbox_peer_id); } 1152 1121 else 1153 1122 { proxy = cli; } 1154 1123 if (!proxy || !proxy->reader) 1155 { return -1; } 1124 { 1125 cs_log("error, gbox_recv_chk, proxy not found"); 1126 return -1; 1127 } 1156 1128 proxy->last = time((time_t *)0); 1157 1129 *rc = 1; … … 1446 1418 static int32_t gbox_client_init(struct s_client *cli) 1447 1419 { 1420 if (!cli || cli->typ != 'p' || !cli->reader) 1421 { 1422 cs_log("error, wrong call to gbox_proxy_init!"); 1423 return -1; 1424 } 1425 1448 1426 if (!local_gbox_initialized) 1449 1427 { init_local_gbox(); } … … 1530 1508 1531 1509 cli->reader->card_status = CARD_NEED_INIT; 1532 gbox_send_hello(cli );1510 gbox_send_hello(cli, GBOX_STAT_HELLOL); 1533 1511 1534 1512 if(!cli->reader->gbox_maxecmsend) … … 1576 1554 cs_log_dbg(D_READER, "time since last ecm in sec: %d => trigger keepalive hello",time_since_last); 1577 1555 if (!peer->online) 1578 { peer->hello_stat = GBOX_STAT_HELLOL; }1556 { gbox_send_hello(proxy, GBOX_STAT_HELLOL); } 1579 1557 else 1580 { peer->hello_stat = GBOX_STAT_HELLOS; } 1581 gbox_send_hello(proxy); 1582 peer->hello_stat = GBOX_STAT_HELLOR; 1558 { gbox_send_hello(proxy, GBOX_STAT_HELLOS); } 1583 1559 cs_writeunlock(&peer->lock); 1584 1560 } … … 1631 1607 uchar outbuf[15]; 1632 1608 struct s_client *cli; 1609 cs_readlock(&clientlist_lock); 1633 1610 for (cli = first_client; cli; cli = cli->next) 1634 1611 { … … 1644 1621 } 1645 1622 } 1623 cs_readunlock(&clientlist_lock); 1646 1624 } 1647 1625 */ … … 1652 1630 int32_t hostname_len = strlen(cfg.gbox_hostname); 1653 1631 struct s_client *cli; 1632 cs_readlock(&clientlist_lock); 1654 1633 for (cli = first_client; cli; cli = cli->next) 1655 1634 { … … 1668 1647 } 1669 1648 } 1649 cs_readunlock(&clientlist_lock); 1670 1650 } 1671 1651 */ -
trunk/module-gbox.h
r10568 r10608 103 103 struct gbox_card_id id; 104 104 uint32_t caprovid; 105 uint8_t slot;106 105 uint8_t dist; 107 106 uint8_t lvl; … … 128 127 uchar *hostname; 129 128 int8_t online; 130 int8_t hello_stat;131 129 uint8_t next_hello; 132 130 uchar ecm_idx; … … 142 140 // uint16_t gbox_ecm_id; 143 141 // uint8_t gbox_ecm_ok; 144 uint8_t gbox_hops; 145 uint16_t gbox_peer; 146 uint16_t gbox_mypeer; 147 uint16_t gbox_caid; //could be calculated 0x05 and 0x0D are 148 uint16_t gbox_prid; //same as gbox_caid 149 uint8_t gbox_slot; 150 uint8_t gbox_version; 151 uint8_t gbox_unknown; //byte between version and cpu info of 152 uint8_t gbox_type; 153 uchar gbox_routing_info[GBOX_MAXHOPS]; //support max 10 hops 142 uint8_t gbox_hops; 143 uint16_t gbox_peer; 144 uint16_t gbox_mypeer; 145 uint8_t gbox_slot; 146 uint8_t gbox_version; 147 uint8_t gbox_unknown; //byte between version and cpu info of 148 uint8_t gbox_type; 149 uchar gbox_routing_info[GBOX_MAXHOPS]; //support max 10 hops 154 150 }; 155 151 … … 160 156 int8_t gbox_message_header(uchar *buf, uint16_t cmd, uint32_t peer_password, uint32_t local_password); 161 157 void gbox_free_cards_pending(ECM_REQUEST *er); 162 void gbox_send_hello_packet(struct s_client * cli, int8_t number, uchar *outbuf, uchar *ptr, int32_t nbcards);158 void gbox_send_hello_packet(struct s_client *proxy, int8_t number, uchar *outbuf, uchar *ptr, int32_t nbcards, uint8_t hello_stat); 163 159 #else 164 160 static inline void gbox_free_cards_pending(ECM_REQUEST *UNUSED(er)) { }
Note:
See TracChangeset
for help on using the changeset viewer.