Exemplo n.º 1
0
int getIPv6Addr(char *intf, char *ipv6addr)
{
	L3Addr_t ips[10] = {0};
	int cnt = 0;
	int i = 0;
	char buf[100] = {0};

	kinfo("Enter");

	if(!safe_strcmp(intf, "br0"))
		cnt = getL3LocalList(ips, 10, NULL);

	kinfo("ipaddr (totally %d)", cnt);
	for(i = 0; i < cnt; i++) {
		kinfo("%s, type(%d)", ips[i].ipAddrStr, ips[i].type);

		changeString(ips[i].ipAddrStr);
		
		sprintf(buf, "%d|%s||", ips[i].type, ips[i].ipAddrStr);

		strcat(ipv6addr, buf);
	}
	
	return 0;		
}
Exemplo n.º 2
0
int main()
{
    char str[] = "homehome";
    
    changeString(str);
    printf("%s \n", str);
    
    

}
Exemplo n.º 3
0
int tcpServer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { QString _r = currentTime();
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 1: changeString((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 2: stopButtonClicked(); break;
        case 3: continueButtonClicked(); break;
        }
        _id -= 4;
    }
    return _id;
}
Exemplo n.º 4
0
void StolkyListbox::changed(int stolek) {
  vector<SCStolek *>::iterator vi;
  int i = 1;
  
  for (vi = stoly.begin();
       vi != stoly.end();
       vi++) {
       
    if ((*vi)->id == stolek) {
      break;
    }
    i++;
  }
  if (vi == stoly.end()) return;
  changeString(i, getListboxString(*vi));
  char *s = getListboxString(*vi).toString();
  printf("%s\n", s);
  free(s);
}