336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

ipsec

ipsec is actually an umbrella command comprising a collection of individual sub commands of the form

ipsec <command> [ <argument> ] [ <options> ]

that can be used to control and monitor IPsec connections as well as the IKE daemons.

Control Commands

ipsec start [ <starter options> ]

calls ipsec starter [ <starter options> ] which in turn parses ipsec.conf and starts the IKE daemon charon.

ipsec stop

terminates all IPsec connection and stops the IKE daemon charon by sending a TERM signal to ipsec starter.

ipsec restart [ <starter options> ]

is equivalent to ipsec stop followed by ipsec start [ <starter options> ] after a guard period of 2 seconds.

ipsec update

sends a HUP signal to ipsec starter which in turn determines any changes in ipsec.conf and updates the configuration on the running IKE daemon charon. Currently established connections are not affected by configuration changes.

ipsec reload

sends a USR1 signal to ipsec starter which in turn reloads the whole configuration on the running IKE daemon charon based on the actual ipsec.conf. Currently established connections are not affected by configuration changes.

ipsec up <name>

tells the IKE daemon to start up connection <name>. Implemented by calling the ipsec stroke up <name> command.

ipsec down <name>

tells the IKE daemon to terminate connection <name>. Implemented by calling the ipsec stroke down <name> command.

ipsec down <name>{n}

terminates CHILD_SA instance n of connection <name>. Since {n} uniquely identifis a CHILD_SA the name is optional.

ipsec down <name>{*}

terminates all CHILD_SA instances of connection <name>.

ipsec down <name>[n]

terminates IKE_SA instance n of connection <name> plus dependent CHILD_SAs. Since [n] uniquely identifis an IKE_SA the name is optional.

ipsec down <name>[*]

terminates all IKE_SA instances of connection <name>.

ipsec route <name>

tells the IKE daemon to insert IPsec policies in the kernel for connection <name>. The first payload packet matching the IPsec policies will automatically trigger an IKE connection setup. Implemented by calling the ipsec stroke route <name> command.

ipsec unroute <name>

remove the IPsec policies in the kernel for connection <name>. Implemented by calling the ipsec stroke unroute <name>command.

ipsec status [ <name> ]

returns concise status information either on connection <name> or if the argument is lacking, on all connections. Implemented by calling the ipsec stroke status [ <name> ] command.

ipsec statusall [ <name> ]

returns detailed status information either on connection <name> or if the argument is lacking, on all connections. Implemented by calling the ipsec stroke statusall [ <name> ] command.

Info Commands

ipsec version

returns the ipsec version in the form of Linux strongSwan U<strongSwan userland version>/K<Linux kernel version> if strongSwan uses the native NETKEY IPsec stack of the Linux kernel it is running on.

ipsec copyright

returns the copyright information.

ipsec --confdir

returns the SYSCONFDIR directory as defined by the configure options.

ipsec --directory

returns the LIBEXECDIR directory as defined by the configure options.

ipsec --help

returns the usage information for the ipsec command.

ipsec --versioncode

returns the ipsec version number in the form of U<strongSwan userland version>/K<Linux kernel version> if strongSwan uses the native NETKEY IPsec stack of the Linux kernel it is running on.

List Commands

ipsec listaacerts [ --utc ]

returns a list of X.509 Authorization Authority (AA) certificates that were loaded locally by the IKE daemon from the/etc/ipsec.d/aacerts directory. Implemented by calling the ipsec stroke listaacerts command.

ipsec listacerts [ --utc ]

returns a list of X.509 Attribute certificates that were loaded locally by the IKE daemon from the /etc/ipsec.d/acerts directory. Implemented by calling the ipsec stroke listacerts command.

ipsec listcounters [ <name> ]

returns a list of global or connection specific counter values about received and sent IKE messages and rekeyings. Connection specific ounters are available since 5.0.3. Implemented by calling the ipsec stroke listcounters command.

ipsec listalgs

returns a list of all supported IKE encryption and hash algorithms, and the available Diffie-Hellman groups. Implemented by calling theipsec stroke listalgs command.

ipsec listcacerts [ --utc ]

returns a list of X.509 Certification Authority (CA) certificates that were loaded locally by the IKE daemon from the/etc/ipsec.d/cacerts directory or received via the IKE protocol. Implemented by calling the ipsec stroke listcacerts command.

ipsec listcainfos [ --utc ]

returns Certification Authority information (CRL distribution points, OCSP URIs, LDAP servers) that were defined by ca sections inipsec.conf. Implemented by calling the ipsec stroke listcainfos command.

ipsec listcrls [ --utc ]

returns a list of Certificate Revocation Lists (CRLs) that were either loaded by the IKE daemon from the /etc/ipsec.d/crls directory or fetched from an HTTP- or LDAP-based CRL distribution point. Implemented by calling the ipsec stroke listcrls command.

ipsec listcerts [ --utc ]

returns a list of X.509 and/or OpenPGP certificates that were either loaded locally by the IKE daemon or received via the IKE protocol. Implemented by calling the ipsec stroke listcerts command.

ipsec listgroups [ --utc ]

returns a list of all groups that are used to define user authorization profiles. Currently not supported.

ipsec listocsp [ --utc ]

returns cached revocation information fetched from OCSP servers. Implemented by calling the ipsec stroke listocsp command.

ipsec listocspcerts [ --utc ]

returns a list of X.509 OCSP Signer certificates that were either loaded locally by the IKE daemon from the /etc/ipsec.d/ocspcertsdirectory or were sent by an OCSP server. Implemented by calling the ipsec stroke listocspcerts command.

ipsec listplugins

returns a list of all loaded plugin features. Implemented by calling the ipsec stroke listplugins command.

ipsec listpubkeys [ --utc ]

returns a list of RSA public keys that were loaded in raw key format. Implemented by calling the ipsec stroke listpubkeys command.

ipsec listall [ --utc ]

returns all information generated by the list commands above. Each list command can be called with the --utc option which displays all dates in UTC instead of local time. Implemented by calling the ipsec stroke listall command.

Reread Commands

ipsec rereadaacerts

reads all certificate files contained in the /etc/ipsec.d/aacerts directory and adds them to the list of Authorization Authority (AA) certificates. Implemented by calling the ipsec stroke rereadaacerts command.

ipsec rereadacerts

reads all certificate files contained in the /etc/ipsec.d/acerts directory and adds them to the list of attribute certificates. Implemented by calling the ipsec stroke rereadacerts command.

ipsec rereadcacerts

reads all certificate files contained in the /etc/ipsec.d/cacerts directory and adds them to the list of Certification Authority (CA) certificates. Implemented by calling the ipsec stroke rereadcacerts command.

ipsec rereadcrls

reads all Certificate Revocation Lists (CRLs) contained in the /etc/ipsec.d/crls directory and adds them to the list of CRLs. Older CRLs are replaced by newer ones. Implemented by calling the ipsec stroke rereadcrls command.

ipsec rereadocspcerts

reads all certificate files contained in the /etc/ipsec.d/ocspcerts directory and adds them to the list of OCSP signer certificates. Implemented by calling the ipsec stroke rereadocspcerts command.

ipsec rereadsecrets

flushes and rereads all secrets defined in ipsec.secrets. Implemented by calling the ipsec stroke rereadsecrets command.

ipsec secrets

is equivalent to ipsec rereadsecrets.

ipsec rereadall

executes all reread commands listed above. Implemented by calling the ipsec stroke rereadall command.

Reset Commands

ipsec resetcounters [ <name> ]

resets global or connection specific counters. Since 5.0.3. Implemented by calling the ipsec stroke resetcounters command.

Purge Commands

ipsec purgecerts

purges all cached certificates. Implemented by calling the ipsec stroke purgecerts command.

ipsec purgecrl

purges all cached CRLs. Implemented by calling the ipsec stroke purgecrl command.

ipsec purgeike

purges IKE_SAs that don't have a CHILD_SA. Implemented by calling the ipsec stroke purgeike command.

ipsec purgeocsp

purges all cached OCSP information records. Implemented by calling the ipsec stroke purgeocsp command.

Before 5.0.0

In releases before 5.0.0 IKEv1 connections were handled by the separate pluto keying daemon. The ipsec command then used theipsec whack in addition to the ipsec stroke command to communicate with pluto.

List Commands

ipsec listcards [ --utc ]

lists all certificates found on attached smart cards. Supported by the IKEv1 pluto daemon only. Implemented by calling the ipsec whack --listcards command.

PKCS11 Proxy Commands

ipsec scencrypt <value> [ --inbase <base> ] [ --outbase <base> ] [ --keyid <id> ]

Supported by the IKEv1 pluto daemon only. Implemented by calling the ipsec whack --scencrypt command.

ipsec scdecrypt <value> [ --inbase <base> ] [ --outbase <base> ] [ --keyid <id> ]

Supported by the IKEv1 pluto daemon only. Implemented by calling the ipsec whack --scdecrypt command.

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

##flex cross-compile

1. ./configure --host=arm-linux --prefix=[prefix 경로] CC=arm-linux-gcc

 

2. config.h 파일에서 다음부분 주석처리

186 : #define malloc rpl_malloc

192 : #define realloc rpl_realloc

 

3. make && make install

 

##dhcpv6

1. echo "ac_cv_func_setpgrp_void=yes" > config.cache

 

2. ./configure --host=arm-linux CC=arm-linux-gcc --prefix=[prefix 경로] LDFLAGS="-L[libfl가 존재하는 경로]" --config-cache

 

3. Makefile에서 LIBS -lfl추가

 

4. LINE_MAX 수정

 

5. make

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


갑자기 플래시를 테스트해야할 일이 생겨

설치해본 adobe flash player~!!

아직 베타버전이라 그런지 사운드에 문제가 있긴하지만

휴대기기상에서 플래시를 보니

왠지모를 어색함

조금있음 진져브래드가 나오는 마당에 이제서야 이러고있는 나...
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


성능 괘얀쿠나 하고 봤다가

마지막 클럭에 엄청난 반전이...

정말 내년 스마트폰들이 엄청 기대되는 상황

크로스 컴파일러가 네이티브 컴파일러 되는날이 머지 않은듯~!!

'Programming > ARM & Luminary Micro' 카테고리의 다른 글

Arm 어셈 명렁어  (0) 2008.04.03
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
안드로이드 상에서 소캣통신 테스트를 위해 간단이 짜깁기해 만들어본 App.

호기심에 안드로이드로 서버를 구성해봤는데 뭐 당연한 결과겠지만 문제없이 잘 돌아감

좀더 이것저것 손볼까하다 귀차니즘에 결국은 컴팩트한 echo chat app.

Server
src

package test.server.tcp;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class main extends Activity {
    /** Called when the activity is first created. */
 
 private ServerSocket socket;
 private int port = 9999;
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        try {
   socket = new ServerSocket(port);
  }catch (IOException e) {
   Log.d("DMSG", "Error : " + e);
   //e.printStackTrace();
  }
  
  while(true) {
   try {
    Socket sock = socket.accept();
    Thread checkUpdate = new echoThread(sock);
    checkUpdate.start();
   }
   catch(IOException ex) {
   }
  }
    }
   
    class echoThread extends Thread {
     
    private Socket sock;

    public echoThread(Socket sock)
    {
       this.sock = sock;
    }
   
    public void run() {
     try {
          InetAddress addr = sock.getInetAddress();
          System.out.println(addr.getHostAddress() + "Connected..");

          BufferedReader br = new BufferedReader(new InputStreamReader(sock.getInputStream()));
          PrintWriter pw = new PrintWriter(new OutputStreamWriter(sock.getOutputStream()));

          String msg = null;
         
          while((msg = br.readLine()) != null)
          {
             Log.d("DMSG", "From " + addr.getHostAddress() + "'s Message: " + msg);
             pw.println(msg + " ..(from server)");
             pw.flush();

             if(msg.equals("exit")){
                break;
             }
          }

          pw.close();
          br.close();
          sock.close();
       }
       catch(Exception e)
       {
          Log.d("DMSG", "Error : " + e);
       }
    }
  
 };
}


Client
src

package test.client.tcp;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.Socket;

import test.client.tcp.R;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;

 

/* Called when the activity is first created. */
public class main extends Activity {

 private String strMsg = "";
 private String read = "";
 private String html = "";
 private Handler mHandler;
 private Socket socket;
 private BufferedReader networkReader;
 private BufferedWriter networkWriter;
 private String ip ="127.0.0.1";
 private int port = 9999;
 private PrintWriter out;
 
 private ListView mConversationView;
 
 private ArrayAdapter<String> mConversationArrayAdapter;
 
 @Override
 protected void onStop() {
  //TODO Auto-generated method stub
  super.onStop();
  try {
   Log.d("DMSG", "Socket close...ok");
   socket.close();
  }catch (IOException e) {
   Log.d("DMSG", "Socket close fail!");
   //TODO Auto-generated catch block
   e.printStackTrace();
  }
 }

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  
  mHandler = new Handler();
  
  try {
   setSocket(ip,port);
   Log.d("DMSG", "OK");
  }catch (IOException e1) {
   //TODO Auto-generated catch block
   e1.printStackTrace();
   Log.d("DMSG", "Error : " + e1);
  }
  
        mConversationArrayAdapter = new ArrayAdapter<String>(this, R.layout.message);
       
        mConversationView = (ListView) findViewById(R.id.in);
        mConversationView.setAdapter(mConversationArrayAdapter);
       
        mConversationView.setTextFilterEnabled(true);        
  
  Button btn = (Button) findViewById(R.id.Button01);
  
  btn.setOnClickListener(new OnClickListener() {
   EditText et = (EditText) findViewById(R.id.EditText01);
   public void onClick(View v) {
    if (et.getText().toString() != null || !et.getText().toString().equals("")) {
     /*PrintWriter*/ out = new PrintWriter(networkWriter,true);
     String return_msg = et.getText().toString();
     out.println(return_msg);
     out.flush();
     strMsg = "Send Message : " + return_msg;
     mConversationArrayAdapter.add(strMsg);
     Log.d("DMSG", "Msg = " + return_msg);
     
     et.setText("");
    } 
   }
  });
  
  try {
   Thread checkUpdate = new echoThread(mConversationArrayAdapter, out);
   checkUpdate.start();
  }
  catch(Exception ex) {
   Log.d ("DMSG", "Error : " + ex);
  }
 }

 class echoThread extends Thread {
  
  ArrayAdapter<String> conversationArrayAdapter;
  PrintWriter pw;
  String tmp;
  
  public echoThread(ArrayAdapter<String> mConversationArrayAdapter, PrintWriter out)
  {
   this.conversationArrayAdapter = mConversationArrayAdapter;
   this.pw = out;
   Log.d("DMSG", "Thread init.");
  }
  
  public void run() {
   try {
    while (true) {
     Log.w("DMSG","chatting is running");
     
     try {
      Thread.sleep(100);
     } catch (Exception e) {
      Log.d("DMSG", "Error : " + e);
     }
     
     read = null;
     while((read = networkReader.readLine()) != null)
     {
               Log.d("DMSG", "receive msg");
               mHandler.post(showUpdate);
     }

    }
   }catch (Exception e) {
    Log.d("DMSG", "Client Thread Error!" + e);
   }
  }
 };
 
 private Runnable showUpdate = new Runnable() {
  public void run() {
   Toast.makeText(main.this,"Coming word: " + html, Toast.LENGTH_SHORT).show();
   mConversationArrayAdapter.add("Receive Message : " + read);
  }
 };
 
 public void setSocket(String ip,int port)throws IOException { 
  try {
   socket =new Socket(ip, port);
   networkWriter = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
   networkReader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
   Log.d("DMSG", "Client Socket Init...");
  }catch (IOException e) {
   System.out.println(e);
   e.printStackTrace();
   Log.d("DMSG", "Client Socket Init fail!");
  }
 }
}


xml

 <?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <ListView android:id="@+id/in"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:stackFromBottom="true"
        android:transcriptMode="alwaysScroll"
        android:layout_weight="1"/>
   <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    <EditText android:id="@+id/EditText01"
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
     android:layout_weight="1"/>
 
    <Button android:id="@+id/Button01"
     android:layout_width="80dip"
     android:layout_height="wrap_content"
     android:text="Send"/>
   </LinearLayout>
</LinearLayout>


xml(message.xml)
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textSize="18sp"
    android:padding="5dp"/>

참고로 위의 App를 실행하기 위해선 AndroidManifest.xml에 아래와 같이 INTERNET permission을 추가해 주어야함

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

실행화면(client)

참고로 실행 장비가 Odroid-T라서 해상도및 비율이 일판 스마트폰들과는 조금 다르게 보임

'Programming > android' 카테고리의 다른 글

android에서 external command 사용하는 방법  (0) 2010.09.03
Supporting Multiple Screens  (0) 2010.05.20
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

출근하자마자 당황하게 만드는 VMware error!

Error While powering on: The VMware Authorization Service is not running....

대처 방법은 간단하다

시작 -> 제어판 -> 관리도구 -> 서비스 -> VMware Authorization Service 다시 시작

'Programming > 그밖에...' 카테고리의 다른 글

Android froyo flash~!!  (0) 2010.11.19
컴퓨터 네트워크의 기초  (0) 2010.11.19
섹시한 라이브러리?? libsexy.so  (0) 2010.09.14
Android SDK 설치시 error  (0) 2009.11.20
S3C2440 Camera test 분석(진행중...)  (0) 2009.10.15
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
리눅스에서 usr/lib 를 뒤지던 중

우연히 보게된 libsexy.so...

과연 무슨 라이브러리인데 이름을 섹시하게 지었을까?

궁금중에 바로 구글링~!!

http://www.chipx86.com/w/index.php/Libsexy

과연 난 대단한걸(19禁??) 기대했던걸까??

위 싸이트에서 보면 알겠지만

그져 GTK+ 용 위젯 라이브러리...

무식함이 절도 티나는 순간...-.ㅜ

+ Recent posts