Changeset 2643

Show
Ignore:
Timestamp:
06/22/12 12:51:35 (11 months ago)
Author:
peter
Message:

add getRemote to lua DNSPacket binding

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/lua-auth.cc

    r2631 r2643  
    160160} 
    161161 
     162static int ldp_getRemote(lua_State *L) { 
     163  DNSPacket *p=ldp_checkDNSPacket(L); 
     164  lua_pushstring(L, p->getRemote().c_str()); 
     165  return 1; 
     166} 
     167 
    162168static const struct luaL_reg ldp_methods [] = { 
    163169      {"setRcode", ldp_setRcode}, 
    164170      {"getQuestion", ldp_getQuestion}, 
    165171      {"addRecords", ldp_addRecords}, 
     172      {"getRemote", ldp_getRemote}, 
    166173      {NULL, NULL} 
    167174    };